Sending some data clears UART interrupt bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-25 7:42 AM
I am using STM32F042K6TX. I set UART read data register not empty interrupt, I am sending and receiving data.
This is how RXNEIE bit before it is corrupted.
In this code when "i" is 2 it clears RXNEIE bit. I tried all numbers 0-255 and only 2 does this. I am calling a function in Timer interrupt and the code above is in that function. Timer interrupt priority is lower than UART interrupt.
After sending 2 in fourth byte of data RXNEIE bit is like that. What should I do to solve this? Thank you.
- Labels:
-
STM32F0 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-25 8:24 AM
It's possible data is received, the receive transfer completes, and the RXNEIE bit is cleared within the IRQ handler.
Doesn't seem like the code you posted affects it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-25 9:43 AM
Inspecting the UART peripheral registers in the debugger will change the state, looking at UART->TDR has secondary consequences..
Up vote any posts that you find helpful, it shows what's working..
