2017-01-20 03:39 AM
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:
Receive data 'HELLO' (first time)
Received data 'LLOHE'(second time)
Received data 'OHELL'(third time)
This keeps shifting like this every time.
Kindly suggest .
Thanks,
Utpal
2017-01-20 04:20 AM
Hi
kumar.utpal
,I advise you to use the example provided in the
package under the path below: STM32Cube_FW_F4_V1.0\Projects\STM32F429I-Discovery\Examples\UART\UART_TwoBoards_ComDMAKhouloud.
2017-01-20 08:20 AM
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.
2017-02-15 10:30 PM
Thanks everyone
2017-02-15 11:25 PM
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.