How Best To Buffer/Receive This UART Data?
I need to receive a six-byte packet via the UART (using an STM32L010F4). There is a SOF and an EOF byte included in these six bytes. There could be long stretches when no data is sent, followed by a stream of these six-byte packets that are 5mS apart. Once a valid packet is received, I need to perform some basic math on the four non-SOF/EOF bytes (some addition and multiplication), re-package the data into another packet, and send it out to a host on a different UART.
Utilizing the DMA seems to cause me to miss-sync with these incoming messages, as has been pointed out to me. What would be the best architecture for this? Utilize a much larger buffer?
