2024-08-19 11:22 PM
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.
2024-08-20 05:44 AM
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.
2024-08-20 07:23 AM
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