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?
None of this has anything to do with Keil or ARM: it's all ST stuff - so you should be asking ST:
https://community.st.com/s/
See: https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158950#158950
Thanks a lot!
It is a DMA related receive function, not related to transmits you have in flight or might want to start.
The DMA can interrupt at two points, when it is half way through your buffer, or all the way through. Remember the location and size of your buffer to be able to recover/use the data received so far.
Track if you have a output task (IT or DMA) pending for transmitting.
Call backs are entered in interrupt context, you can't use functions that poll or block