cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f429 receiving buffer issue USART DMA

utpal kumar
Associate II
Posted on January 20, 2017 at 12:39

Hi,

We are using STM32f429 microcontroller for our project.

I'm having problem receiving buffer in  USART DMA data between two stm32f429 controllers with the Baud rate of 9600.

We are able to receive all the  data every time, but frame of data will be shifted in received buffer,

EX:

  1. Receive data  'HELLO' (first time)

  2. Received data  'LLOHE'(second time)

  3. Received data  'OHELL'(third time)

                This keeps shifting like this every time.

Kindly suggest .

Thanks,

Utpal

4 REPLIES 4
Khouloud GARSI
Lead II
Posted on January 20, 2017 at 13:20

Hi

kumar.utpal

,

I advise you to use the example provided in the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

package under the path below:

STM32Cube_FW_F4_V1.0\Projects\STM32F429I-Discovery\Examples\UART\UART_TwoBoards_ComDMA

Khouloud.

Posted on January 20, 2017 at 17:20

You know it is near impossible to understand what you are doing if you don't provide code or some window into what you have done. You are describing symptoms, the cause is from how you have actually implemented it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
utpal kumar
Associate II
Posted on February 16, 2017 at 07:30

Thanks everyone

Posted on February 16, 2017 at 08:25

Is there any time between one 'HELLO' and the next?

You are dropping characters. The double buffering of circular mode with interrupts at 1/2 done and fully done should be able to handle this with no problem.

If you are only doing a single DMA transfer of 5 characters, then restarting, there are characters coming in while the DMA controller is shut down. Use circular mode with interrupts instead.

If you have no idea how many characters you will be getting, you will need to over specify the buffer and use timeouts.