I am facing a UART interrupt issue with my current setup which occurs not deterministically after a variable period of time.
My setup in detail:
- 2 UARTs:
- 1 UART incoming data with 200 Hz is copied within the ISR into a ringbuffer and processed within a task
- 1 UART as console
- Output over CAN
What happens (error description):
After an undefined period of time (between 30 minutes and several hours) the UART callback related to receiving data is not called anymore. As a result, it seems that no new data is avaiable as the ringbuffer head is not moved anymore. What I can see from the debugger is, that the program is still running. For data incoming with 100 Hz over UART, this issue seems not to occur.
Some things I already tried:
- checked that the interrupt flag for receiving new data is still set
- increased task stack sizes and ringbuffer size
- compiled with -fstack-check to check for stack overflows
- protected the ringbuffer with CRITICAL statements against reading and writing from the ISR and the task
- checked the receiving data buffer: there is new data available (but the interrupt won't hit)
I am running out of ideas how to further deal with this. Any suggestions are appreciated.