Skip to main content
mmed
Associate III
December 13, 2018
Question

Uart rx: whats the best solution Receive unkown size of message

  • December 13, 2018
  • 2 replies
  • 716 views

using HAL or LL libraries, its mandatory to set the size message in the receive function. I want to receive messaege with undefined size. whats the best way to implment it! help please.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
December 14, 2018

Each byte reception generates an interrupt, you process byte that into a buffer in a stateful fashion, when you have a complete packet, or line, or however you delineate content, you pass that off to a worker task to process/digest. If you don't like interrupts, have a circular DMA buffer, with adequate size for your sweep frequency, and have a worker task pull the data for processing.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..