cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with ISR driven UART + loopback

michael
Associate II
Posted on April 09, 2008 at 07:08

trouble with ISR driven UART + loopback

3 REPLIES 3
michael
Associate II
Posted on May 17, 2011 at 09:51

Hello all,

Here is the situation: I configure my UART to support loopback and to generate an interrupt when the fifo is 1/2 full but it goes wrong even if the fifos are disabled. the thing is that even I do acknowledge the interrupt, the ISR is invoked for the same character! Please note: this happens even if I send a single character!

This is the ISR:

Code:

<BR>unsigned char l_data = UART1->DR ; <BR> <BR> <BR> UART_ClearITPendingBit(UART1, UART_IT_Receive) ; <BR> //UART_ClearFlag(UART1) ; <BR> <BR> VIC0->VAR = 0; // Acknowledge Interrupt <BR> VIC1->VAR = 0; // Acknowledge Interrupt

UART1->DR keeps on containing the same character!

I know the UART works, because when I disable UART1_IMSC's RXIM bit, interrupts are not longer generated but the data ends up on the bus (still looped back though...).

Can you help me?

[ This message was edited by: michael.tamir on 09-04-2008 09:15 ]

kais
Associate II
Posted on May 17, 2011 at 09:51

Hi,

could you please calrify more:

what do you mean by this?

''the ISR is invoked for the same character! ???''

Regards,

Eris.

michael
Associate II
Posted on May 17, 2011 at 09:51

Hello and thanks for your reply,

I mean that every time the ISR is invoked, I read the same character from the DR register! The ISR is invoked continuousely, delivering the same character.