USART Transmit Block Description
This block is used to send data gathered in the USART/UART transmit buffer in STM microcontrollers. To add data to the transmit buffer, use the USART Add to Transmit Buffer block. There is an option to choose between UART, USART, or LPUART interfaces.
Splitting the functionality into two separate blocks – one for adding data to the buffer and another for transmitting it – results from the behavior of DMA-based transmission in non-blocking mode. In this mode, sending data may take longer than a single function execution period. Attempting to restart transmission before the previous one finishes would return an error indicating that the DMA controller is busy. Utilizing two separate blocks allows all data to be collected in the buffer first and then transmitted at once.

Table of Contents
Inputs
This block has no inputs.
Outputs
| Output Name | Type | Description |
|---|---|---|
| Send Bytes | uint32 | Amount of data that has been sent. |
Block Parameters
| Parameter | Description |
|---|---|
| USART/UART module number | Number of the USART/UART module. |
| Type | Peripheral interface type:UART/USART - UART or USART interfaceLPUART - LPUART interface |
| Use DMA | Enables DMA support. |
| Timeout [ms] | The time limit the system waits for the block execution to complete. |
| Sample time | Function refresh period. |

CubeMX Configuration for a Given MCU Model
The interface configuration instructions are located on the subpage CubeMX Configuration for a Given MCU Model.