Re-synchronise HAL_UART_Receive_DMA best way?
Hello,
Using HAL_UART_Receive_DMA() function and expecting an N length message, so have set the buffer length and transfer size to N.
The communicating equipment sometimes adds an extra character / or drops a character which is taking my DMA out of synchronisation.
Once out of synchronisation it is then staying like this until a reset occurs.
I can capture that it is out of sync and log a data error. When this occurs I would like to restart the DMA so that the data is resynchronised.
Example of the problem below:
Normal Operation Receive Bytes: 1, 2, 3, 4, ... N
When out of Sync every receive now looks like: 2, 3, 4, ... N, 1
What functions are in the HAL that allow me to resynchronise the DMA in the best way?
Thanks in advance.
PS - Have moved away from using DMA to IDLE as the connecting equipment sometimes drips feeds bytes in a disorderly fashion.
