UART interrupt not received after some time and ORE bit is high
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-23 4:40 AM
Hi All,
My application sends and receive data very frequently, Some times Tx and Rx may be occur same time, Application run for some time (10 sec or 20 sec) but after some time Rx interrupts stop working and i found ORE bit high.
So My question is
- What happen when Tx and Rx occur at same time (Tx blocking mode and Rx in interrupt mode)
- How to clear ORE bit it goes high
- Labels:
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-23 7:18 AM
There's no reason RX and TX can't occur concurrently.
If your IRQ Handlers block for more than a byte time, you'll likely run into issues. Have them buffer data, and have whatever parsing/processing done somewhere else, that doesn't have tight time constraints.
Overruns occur if you are not attentive to hard deadlines.
Depends on the model of STM32, the Reference Manual should describe how to clear, and which register to use.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-23 7:44 AM
Which STM32?
> How to clear ORE bit it goes high
This is why it's important to tell, which STM32. There are 2 different UART modules in the various STM32 and the procedure is different too - but in any case, it's in the RM, so it's enough to read it and follow it.
So, check in the RM for *your* STM32.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-23 8:13 AM
More than likely you don't check for HAL status when you call HAL_UART_Receive_IT. If it returns HAL_BUSY then the interrupt isn't enabled.
If that is the case, then check this post that i replied to https://community.st.com/s/question/0D53W000022Hi9ySAC/stm32-hal-uart-receive-interrupt-stops-receiving-at-random-times
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-25 9:05 PM
Thanks for your answers,
As per data sheet USART is full duplex, I want to know if There is single register for Tx and Rx that is DR register, how can be full duplex, What else if Tx and Rx occur at a same time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-25 9:32 PM
Its not a memory, the receive and transmit registers can exist at the same address, but there are two independent data paths and registers. The operate independently and concurrently.
Up vote any posts that you find helpful, it shows what's working..
