Buffer never filled due to incorrect message/noise, how to reset if buffer not filled in time?
Given the following possibilities:
- Buffer not filled due to message not being in correct format
- Buffer not filled due to random characters sent on the TX line
How do I go about resetting/aborting the transfer if the message isn't fully filling the buffer.
I'd use half transfer but what if the noise is less than half of the buffer?
I will not get the interrupt if the buffer isn't half full or full.
My solution would be to start a timer on first byte received, and if buffer not filled within x time then abort and reset receive. If this would be your solution how do I get an interrupt on first byte of message received?
Any help on this issue is greatly appreciated.