how can uart1 interrupt pending clear?

General discussion on mikroC PRO for FT90x.
Post Reply
Author
Message
max1868
Posts: 33
Joined: 11 Apr 2017 01:08

how can uart1 interrupt pending clear?

#1 Post by max1868 » 02 May 2017 09:31

It is possible to enter the interrupt vector at the initial reception.
However, it is impossible to escape from interrupts.
It is likely that you will clear the pending bit.
I do not know how to clear the pending bit

plese



void sys_init(void)
{
UART1_Init(115200);
// UART1_FCR |= ( 1 << FIFO_EN ) | ( 1 << RCVR_RST ); // set up UART interrupt
IRQ_CTRL.B31 = 0;
UART1_LCR.B7 = 0;
UART1_INT_ENABLE = 0x1; //Enable Received Data Available Interrupt

}

void interrupt() iv IVT_UART1_IRQ {
temp++;
UART1_Write(temp);

}

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: how can uart1 interrupt pending clear?

#2 Post by darko.ilijevski » 05 May 2017 08:32

Hello,

In general, first thing you need to do in the interrupt routine is to clear the interrupt source, so it doesn't repeatedly trigger the same interrupt, if it triggered it already.
There is a good and comprehensive explanation example in the help file of the compiler for the FT900 on using interrupts. You can read about it on the web page below:

http://download.mikroe.com/documents/co ... rrupts.htm

Best regards
BR,
Darko

Post Reply

Return to “mikroC PRO for FT90x General”