Skip to main content
Graduate
August 20, 2024
Question

STM32F446VET7 DMA Transmission

  • August 20, 2024
  • 2 replies
  • 640 views

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

    Super User
    August 20, 2024

    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.

    Super User
    August 20, 2024

    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