Skip to Content

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.



USART Transmit block

Table of Contents

Inputs

This block has no inputs.

Outputs

Output NameTypeDescription
Send Bytesuint32Amount of data that has been sent.

Block Parameters

ParameterDescription
USART/UART module numberNumber of the USART/UART module.
TypePeripheral interface type:
UART/USART - UART or USART interface
LPUART - LPUART interface
Use DMAEnables DMA support.
Timeout [ms]The time limit the system waits for the block execution to complete.
Sample timeFunction refresh period.


Block parameters for USART

CubeMX Configuration for a Given MCU Model

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

See Also

Last updated on