On 5/9/2024 10:23 PM, Mark Stevens wrote:
The issue arises if I try to kill the kernel thread reading from the UART and 
then try to start a user thread reading from the same UART.

Hmmm... the UART device will closed when the kernel thread is killed, right?   When the device is closed, it is also flushed I believe.  If those two things are true, then data loss would be expected, right?

Note that for a UART console, stdin is inherited so that the UART is not closed when the kernel thread exits.

Also, the issue can be reproduced within the first 15 seconds after board reset 
so I am confident that the issue will not be related to long term drift.

From what I have read, any kind of slow drift is not possible due to the start and stop bits.  Those transitions are necessary to synchronize on each byte.  I also read that in the event of bad start bit, several bytes could be lost while the UART recovers.

But that does not seem to be these issue here.

Reply via email to