cancel
Showing results for 
Search instead for 
Did you mean: 

DMA_UART_Receive_Problem_Reg

nanotronicsnss
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You'll need to stop the first transfer with HAL_UART_Abort and start another one.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

You'll need to stop the first transfer with HAL_UART_Abort and start another one.

If you feel a post has answered your question, please click "Accept as Solution".

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

Pavel A.
Evangelist III

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.

thank u for your help...