cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446VET7 DMA Transmission

testbenchmark
Associate III

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

 

2 REPLIES 2
TDK
Guru

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".

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