Some Uart interrupt sources in one external isr

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

How could manage "TX FIFO empty" and "RX FIFO not empty" interrupt sources, for example, if I only have one external interrupt output ?

   

Must it be checked any flag inside "CY_ISR(MyUart_ISR){}" for determining which interrupt was who produced interrupt ? 

   

Thanks,

   

Asier.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are quite right. Checking the UART state will also clear (some) interrupt causes.

   

 

   

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are quite right. Checking the UART state will also clear (some) interrupt causes.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you Bob.

   

Which are the flags I could polling to catch "TX FIFO empty" and "RX FIFO not empty" events ?

   

I want to be able to distinguish between the two events and so do the corresponding task. I mean, U1_UartGetChar(); if  "RX FIFO not empty" interrupt happens and U1_UartPutChar(); if it catches "TX FIFO empty".

   

Asier.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Look into datasheet for uint32 SCB_GetTxInterruptSource(void) starting at page 189.

   

 

   

Bob