Receiving long data while Uart interrupts are disabled ends with error
Posted: Sat Jan 13, 2018 8:23 pm
Hi guys,
I made a simple CMD for my application using uart. In a determinate moment, I want to disable all uart interrupts for performing some tasks and then reactivate them. All received data while interrupts are disabled, are thrown.
The thing is that while interrupts are disabled, there could be an error or something and i could start receiving lot of chars (like a stucked key or something). And when this happens all seems to work as expected except for one thing, at this point every new data that i receive arrives one interrupt late.
illustrative example:
Send: "a"
Receive: (last command, unknown here)
Send: "b"
Receive: "a"
Send: "c"
Receive: "b"
and so on.
I made a simple CMD for my application using uart. In a determinate moment, I want to disable all uart interrupts for performing some tasks and then reactivate them. All received data while interrupts are disabled, are thrown.
The thing is that while interrupts are disabled, there could be an error or something and i could start receiving lot of chars (like a stucked key or something). And when this happens all seems to work as expected except for one thing, at this point every new data that i receive arrives one interrupt late.
illustrative example:
Send: "a"
Receive: (last command, unknown here)
Send: "b"
Receive: "a"
Send: "c"
Receive: "b"
and so on.