Engee documentation

STM32 USART RX

Receiving data from the UART transceiver.

blockType: CFunction

Path in the library:

/Interfaces/Targets/STM32/STM32 USART RX

Description

To work with the block, install/update the support package. equipment.

Block STM32 USART RX It is used to receive data from a UART transceiver.

Ports

Output

# Data — received bytes from the transmitter
scalar

Details

Received bytes from the transmitter. Dimension: () if the transfer is one byte, or (n,), where n — the number of bytes to receive.

Data types

uint8_t

Complex numbers support

No

Parameters

Main group

# Модуль: — the USART module selected in CubeMX
1 | 2 | 3

Details
Values

1 | 2 | 3

Default value

1

Program usage name

m_module

Tunable

No

Evaluatable

Yes

# Размер буфера на приём: — number of bytes per reception from the UART transceiver

Details
Default value

7

Program usage name

m_buf_length

Tunable

No

Evaluatable

Yes

# Таймаут на приём, мс: — waiting time for incoming message

Details
Default value

1000

Program usage name

m_uart_timeout

Tunable

No

Evaluatable

Yes

Configuring CubeMX to work with the USART module, receiving data

In the "Pinout & Configuration" tab, in the "Connectivity" column, select the USART module you are interested in working with. In the "Mode" field, specify the desired mode and the required operating speed.

stm32 prepare 8

Generate the code.