Tool/software:
i configure uart with two interrupts. Rx interrupt and Rx timeout. but seems like both not working together. when i disable RX interrupt then rx time out interrupt work fine.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
i configure uart with two interrupts. Rx interrupt and Rx timeout. but seems like both not working together. when i disable RX interrupt then rx time out interrupt work fine.
My first guess is that, in response to the RX interrupt, you're emptying the Rx FIFO. The RTOUT interrupt will only trigger if the Rx FIFO is non-empty [Ref TRM (SLAU846B) Table 18-8].
If so, the solution would be to have the RX interrupt always leave (at least) one byte in the FIFO (and maybe increase the FIFO threshold). Then for the RTOUT interrupt, you would empty the FIFO, in effect disabling the feature until the next byte arrives.
I noticed after posting this that the UART doesn't have a register that says how many bytes are in the Rx FIFO.
A strategy for dealing with this is presented over here: