Try   HackMD

STM32 - UART + Interrupt

References

HAL_UART_Transmit_IT() is a non-blocking I/O function. The function returns immediately after starting data tranfer. When transfer is completed, an interrupt will fire. How this interrupt is handled (i.e. its ISR) is left to user implementation.

Besides completion, errors during transmission also trigger its own callback. Errors are handled by offering custom callback function.

Like other I/O functions, various events related to data tranfer (e.g. half complete) can be assigned custom callback functions.

HAL: #4 How to - UART Interrupt

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

To do this:

  1. Configure NVIC: ether setup manually or using IDEs.
  2. Implement callback functions for event of interests: e.g. implement HAL_UART_RxCpltCallback() to handle rx completion.
  3. Use *_IT version of I/O function: in this case it's the HAL_UART_{Transmit, Receive}_IT()