This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

read two input via usart without losing anything

Hello
In my project I should read two usart input ports without losing my input data.Each input should gets a string's length of 120 each 10ms.How can I handle both of them?

I think I can do with two thread such as this diagram
obrazki.elektroda.pl/7019832800_1473252743.png
(does it possible easily or not?)

Or can do it with a simple approach instead of using multi-threading?

Thanks

Parents
  • Yes - it's really important to not just test "Happy Path" where only correct packets arrives perfectly synchronized with the receiver. The real world is seldom as nice as that.

    Besides broken data, it's also important to test to send "infinitely large" packets, to make sure there is no buffer overwrites while the receiving side waits for an end marker or whatever is used for sequencing the individual messages.

    Another thing to test is false start bits, invalid baudrate etc, to make sure the UART ISR doesn't get stuck without clearing any error flags.

Reply
  • Yes - it's really important to not just test "Happy Path" where only correct packets arrives perfectly synchronized with the receiver. The real world is seldom as nice as that.

    Besides broken data, it's also important to test to send "infinitely large" packets, to make sure there is no buffer overwrites while the receiving side waits for an end marker or whatever is used for sequencing the individual messages.

    Another thing to test is false start bits, invalid baudrate etc, to make sure the UART ISR doesn't get stuck without clearing any error flags.

Children
No data