Question
Restarting DMA with new configuration
Posted on October 12, 2016 at 12:45
Hello,
I am using STM32F030x. I am trying to read the data from the UART using DMA (channel 2 -> Tx and channel 3-> Rx ). I used CubeMx to generate the initial code and configuration. The DMA is configured in NORMAL mode. I use HAL_UART_Receive_DMA() to start and receive the data on the UART.Now, I have to collect the data into another memory location after a certain time while the initial transfer is not complete. To do this I stop the DMA using HAL_UART_DMAStop() and re-enable the new transmission using HAL_UART_Receive_DMA() . The problem I am facing is that between this HAL_UART_DMAStop and HAL_UART_Receive_DMA, the chip is taking too much time and I am loosing data which is coming on the UART.I would like to know if there is another way to reconfigure the DMA memory register and Size without stopping the DMA or in the fastest way possible. #stm32 #dma