Question
Restarting UART DMA using HAL
Posted on October 09, 2016 at 23:26
What is the best way to restart a DMA servicing a UART using the HAL drivers?
On the first iteration the DMA works correctly; transfers new data and fires interrupt.On second iteration, the DMA transfers only one new data reading but doesn't fire an interrupt.On the third iteration and beyond, the DMA doen't interrupt or transfer data. It is inHAL_DMA_STATE_BUSY
.I've tried usingHAL_DMA_Abort,
HAL_UART_DMAStop
, and recalling the DMA initialisation routine but it still doesn't restart correctly.I can't find any documentation on how to restart the DMA with HAL drivers.Any help would be greatly appreciated. Thanks.