Skip to Content
Block descriptionsUSARTUSART ReceiveAll

USART ReceiveALL Block Description

This block is used to receive data via the UART, USART, or LPUART interface in STM microcontrollers. It enables receiving all data along with headers and/or terminators and returns them at the output. To receive data with a specific header and/or terminator, use the USART Receive block.



USART ReceiveALL block

Table of Contents

Inputs

This block has no inputs.

Outputs

Output NameTypeDescription
Statusuint8Block operating status. Returns:
1 operation successful
0 operation failed
Num rx bytesuint32Number of received data bytes.
DataDepends on Output data type parameterData from received frames. It is returned excluding headers and/or terminators.

Block Parameters

ParameterDescription
USART/UART module numberNumber of the USART/UART module.
TypePeripheral interface type:
UART/USART - UART or USART interface
LPUART - LPUART interface
Hex formatDetermines how the header is interpreted. When enabled, the header is treated as a sequence of hexadecimal (hex) values; when disabled, it is treated as an ASCII character string.
Output data typeData type of the block output.
Max data length (bytes)Maximum length of received data in bytes.
Non blocking modeEnables the non-blocking operating mode.
Conditional Parameter
Blocking timeout [ms]
How long the block will wait for data in the buffer. If this option is disabled, the block will check for data availability during each refresh period. This parameter is only available when the Non blocking mode option is disabled.
Sample time [s]Function refresh period.


Block parameters for USART ReceiveALL

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