Loading...
 
Skip to main content

System Workbench for STM32


UART circular buffer

You can set up a DMA circular buffer with the MXCube really easily, and just set the receive length to a really large number when you command the DMA receive. For example:

HAL_UART_Receive_DMA(&huart2, gps_circ, 0xFFFFFFFFu); //number of bytes is 2^32, good for about 83 hours continuously at 110kbps