2021-05-25 01:03 AM
Hi,
I am using STM32H750VB Controller. I am using DMA transmit and Receive(Circular Mode) .In receive I am defining an DMA array of fixed size of 10 bytes. My problem is that when 5 bytes of data(first data) is received the array gets updated (Position 0 - 5) and when after some seconds if I receive the second data with 6 bytes the array gets updated (Position 6 to 10).Is there a way to update or reinitialize the DMA array so that if second data comes it starts from array initial position.(Position 0 to 6) .
I have also tried with normal DMA mode and also Circular DMA mode. Have attached the settings screenshot.
Solved! Go to Solution.
2021-05-25 09:55 AM
You'll need to stop the first transfer with HAL_UART_Abort and start another one.
2021-05-25 09:55 AM
You'll need to stop the first transfer with HAL_UART_Abort and start another one.
2021-05-25 11:49 AM
Or just set the Circular mode, and remember where was the end of the previous data - from there you will start to pick the new data.
JW
2021-05-25 01:24 PM
Use the Receive timeout (RTO) feature with circular DMA to detect the pause between data blocks.
Enable RTO interrupt and handle the data received before. Then mark the current receive position and repeat.
2021-05-26 12:39 AM
thank u for your help...