# STM32 - UART + Interrupt [TOC] ## 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](https://youtu.be/xE6GVt7XuJI) {%youtube xE6GVt7XuJI %} 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()`