Skip to main content
Associate III
Aug 20, 2024 6:22 AM UTC
Question

STM32F446VET7 DMA Transmission

Hello,

 

I am trying to transmit 64 byte data with DMA but if I am not use at least 10ms delay the data is not transmitted. How can I check the is data transmitted without any need of delay ? 

I try to check UART is busy or not fort that but its not worked...

Thanks.

 

testbenchmark_0-1724134724919.png

testbenchmark_1-1724134740099.png

 

This topic has been closed for replies.

2 replies

TDK
Aug 20, 2024 12:44 PM UTC

Once HAL_UART_Transmit_DMA is called, the transmission happens in the background. Having a delay after that is not going to affect the transmission. It may affect the next transmission, if you have a race condition.

Must be something else going on. Perhaps a missing volatile qualifier on isPackageSent. Perhaps the other lines of code are getting stalled when called too frequently.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
Aug 20, 2024 2:23 PM UTC

Is isPackageSent volatile?

You also may want to qualify the source of interrupt in the callback.

Other than that, debug normally, toggle pins and observe using oscilloscope/LA to determine progress; observe variables and registers values when "not working", etc. Cube/HAL is open source and it forms part of your code.

JW

PS. Don't post code as screenshots; use the </> icon at top of editor and copy/paste to post code