LPC54608 Usart Interrupt Example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54608 Usart Interrupt Example

1,207 Views
mpazzi
Contributor III

Hello,

I have a question in relation about the Usart Interrupt LPC54608 example, that I re-write down here:

pastedImage_1.png

First question: Why I collect data from the usart also if I have an error (kUSART_RxError) ?

Second question: I haven't found any point where the status of kUSART_RxError is deleted in the code?

If I well understand, on the relative manual it is sayed that must be reset by software.

pastedImage_2.png

Where I'm wronging ?

Thanks a lot for help.

Marco

Labels (1)
0 Kudos
1 Reply

880 Views
Ray_V
Contributor V

First let me say that I do not have the example and I am only replying from my experience without actually looking at the code

First question: Why I collect data from the usart also if I have an error (kUSART_RxError) ?

If you received this error the FIFO is full. the data needs to be pulled out of the FIFO or it will keep getting this error when new data arrives 

Second question: I haven't found any point where the status of kUSART_RxError is deleted in the code?

DEMO_USART_IRQHandler() is not invoked directly as an interrupt handler. It is called by the actual USART interrupt handler, my guess is that it is cleared in the actual interrupt handler (e.g. USART0_IRQHandler)