Engee documentation

Artery USART RX

Receiving data via USART.

blockType: CFunction

Path in the library:

/Interfaces/Targets/Artery/Artery USART RX

Description

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

Block Artery USART RX used for receiving data via USART.

Configuring the AT32 Workbench

  1. In AT32 Workbench enable the desired USART/UART module:

    artery usart rx enable

  2. Configure the parameters in the same way as in the block Artery USART TX (Baud Rate, 8N1).

  3. If necessary, reception with DMA:

    • Go to the DMA tab, click Add;

    • Add a DMA RequestUSARTx_RX;

    • Set Mode to Circular, PriorityHigh.

      artery usart rx dma

  4. Generate the project (Generate Code).

Ports

Output

# Data — accepted data
scalar | vector

Details

The vector of bytes received. The dimension is determined by the parameter Размер буфера на приём:.

Data types

UInt8

Complex numbers support

No

Parameters

Main group

# Модуль: — USART/UART module number
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Default value

1

Program usage name

m_module

Tunable

No

Evaluatable

Yes

# Размер буфера на приём: — receive buffer size in bytes

Details
Default value

7

Program usage name

m_buf_length

Tunable

No

Evaluatable

Yes

# Таймаут на приём, мс: — reception timeout in milliseconds

Details
Default value

1000

Program usage name

m_uart_timeout

Tunable

No

Evaluatable

Yes