Skip to main content
GShen.1
Associate II
June 19, 2020
Question

How to use the HAL_UART_HalfCpltCallback function

  • June 19, 2020
  • 5 replies
  • 2490 views

MCU:STM32F0Discovery board

Tools:STM32CubeMX+Keil5.30

Test condition: PC_SerialComm tools & FT232 chip board

After trying the HAL_UART_RxHalfCpltCallback Function, I find that this function couldn`t be used in the normal transmit in UART_Comm.

And would you tell me which condition I can use this function, just in single wire mode or the others?

This topic has been closed for replies.

5 replies

TDK
June 19, 2020

"We couldn’t find any code matching 'HAL_UART_HalfCpltCallback' in STMicroelectronics/STM32CubeF0"

Doesn't seem like that's a function.

HAL_UART_TxHalfCpltCallback, however, is called when using DMA and the transfer is halfway complete. It's not called in blocking or IT mode.

"If you feel a post has answered your question, please click ""Accept as Solution""."
GShen.1
GShen.1Author
Associate II
June 19, 2020

After trying the HAL_UART_RxHalfCpltCallback Function, I find that this function couldn`t be used in the normal transmit in UART_Comm.

And would you tell me which condition I can use this function, just in single wire mode or the others?

Tesla DeLorean
Guru
June 19, 2020

The UART should work in full-duplex mode

You can not use blocking code within the callbacks, and you can't nest functionality, ie try to have multiple concurrent transmit operations working.

Show some code, it might help to understand what you're doing, as your description of the problem and method are poor.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
June 19, 2020

Well, the answer is the same:

HAL_UART_RxHalfCpltCallback is called when using DMA and the transfer is halfway complete. It's not called in blocking or IT mode. So in HAL_UART_Receive_DMA.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
June 19, 2020
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..