Engee documentation

Artery USART TX

Data transfer via USART.

blockType: CFunction

Path in the library:

/Interfaces/Targets/Artery/Artery USART TX

Description

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

Block Artery USART TX used for data transfer via USART. Transmission of both scalar and vector data is supported.

Configuring the AT32 Workbench

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

    artery usart tx enable

  2. Configure the parameters in the Basic Parameters tab:

    • ModeAsynchronous;

    • Baud Rate — required speed;

    • Word Length8 Bits;

    • Stop Bits1;

    • ParityNone.

      artery usart tx params

  3. Generate the project (Generate Code).

Ports

Input

# Data — data to transfer
scalar | vector

Details

A vector of bytes to transfer. The dimension is determined by the parameter Размер буфера на передачу:.

Data types

UInt8

Complex numbers support

No

# Length — number of bytes to transfer
scalar

Details
Data types

UInt16

Complex numbers support

No

Output

# Status — transfer status
scalar

Details

Transfer status:

  • 0 — transfer is successful (HAL_OK);

  • 1 — transmission error.

Data types

UInt8

Complex numbers support

No

Parameters

Main group

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

Details
USART1–USART3 and USART6 are fully functional USART. UART4, UART5, UART7, UART8 are simplified UARTs (TX/RX only, without synchronous mode).
Values

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

Default value

1

Program usage name

m_module

Tunable

No

Evaluatable

Yes

# Размер буфера на передачу: — transfer buffer size in bytes

Details
Default value

2

Program usage name

m_length

Tunable

No

Evaluatable

Yes

# Таймаут на передачу, мс: — transmission timeout in milliseconds

Details
Default value

100

Program usage name

m_uart_timeout

Tunable

No

Evaluatable

Yes