Host Serial Transmit Block Description
This block is used to transmit (send) a data stream via the host’s serial communication port (UART/USART). It allows for automatic wrapping of the transmitted packet in a defined header and terminator.
To use the block, you must first configure the host serial port using the Host Serial Setup block.

Table of Contents
Inputs
| Input Name | Type | Description |
|---|---|---|
| Data | uint8 | Raw input data intended for transmission via the serial port. |
Outputs
This block does not have any outputs.
Block Parameters
| Parameter | Description |
|---|---|
| Communication port | Selection of the serial port (COM) responsible for data transmission. |
| Header | A sequence of bytes that starts and identifies a valid data frame. |
| Terminator | A sequence of characters or bytes defining the end of the transmitted data frame. |
| Enable blocking mode | An option enforcing the blocking mode of operation (locked as active for this type of transmission operation). |
The Header and Terminator parameters accept byte value arrays in MATLAB notation, which define the start and end of the frame. Characters can be entered directly in single quotes or as numerical values using conversion functions:
- Mixed format (array): Entries are enclosed in square brackets, separating elements with a space or a comma, e.g.,
['A' hex2dec('41')]. - ASCII characters: Single characters are defined in single quotes, e.g.,
'A'(which corresponds to the value0x41). - Hex/Dec values: To enter pure hexadecimal values, use the
hex2dec('hex_value')function, e.g.,hex2dec('41')will return the value65in the decimal system. Do not type the0xprefix before the hexadecimal value, as this will cause an error in interpreting the value.

CubeMX Configuration for a Given MCU Model
It is not possible to configure parameters in CubeMX for this block.
See Also
Last updated on