LPC54608 Usart Interrupt Example

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC54608 Usart Interrupt Example

1,604 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

1,277 次查看
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)