Clear UART Rx Interrupt

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

cross mob
Anonymous
Not applicable

Simple problem but I can't seem to do it. How do you clear the Rx interrupt for an SCB UART block? The datasheet says write 1 to clear but where or how do I write this?

   

Thanks!

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

First you will have to read the data using SCB_UartGetChar() or SCB_UartGetByte().

   

Then you may clear the interrupt causes by SCB_ClearRxInterruptSource(). The parameter is a bit mask which interrupt to clear, 0xff clears all, SCB_GetRxInterruptSource() gets all currently due interrupts SCB_GetRxInterruptSourceMasked() gets all enabled and due interrupts..

   

 

   

Bob

View solution in original post

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

First you will have to read the data using SCB_UartGetChar() or SCB_UartGetByte().

   

Then you may clear the interrupt causes by SCB_ClearRxInterruptSource(). The parameter is a bit mask which interrupt to clear, 0xff clears all, SCB_GetRxInterruptSource() gets all currently due interrupts SCB_GetRxInterruptSourceMasked() gets all enabled and due interrupts..

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Ahh, thanks a bunch! Didn't think about checking the header file for that function. 

0 Likes