uart delay
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 7:23 PM
Hello
Do I need delay when I use HAL_UART_Transmit multiple times?
How much do I need if I need it?
Thank you.
Labels:
- Labels:
-
STM32CubeIDE
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 8:11 PM
HAL_UART_Transmit is blocking, which means it will not return until the transmission is done. There is no need to wait between calls.
HAL_UART_Transmit_IT and HAL_UART_Transmit_DMA happen asynchronously. You will need to wait for the transmission to complete and the state to return to ready before calling them again. Calling them too soon will result in them returning HAL_BUSY.
If you feel a post has answered your question, please click "Accept as Solution".
