Host Serial Setup Block Description
This block is used for the configuration and initialization of a COM serial port, which serves for communication between the simulation in Simulink and external devices, e.g., a board with an STM32 microcontroller.
This block cannot be implemented in a model deployed to a microcontroller.
This family of blocks cannot be implemented in a model deployed to a microcontroller. It is intended exclusively for simulation that takes place entirely on a PC and requires a connection to an external device via a COM serial port. Data received through transmission can be used for visualization in Simulink or to control an external device. Data sent from Simulink can be used to control an external device or to test control algorithms within the simulation.

Table of Contents
Inputs
This block does not have any inputs.
Outputs
This block does not have any outputs.
Block Parameters
| Parameter | Description |
|---|---|
| Communication port | Selection of the communication port (COM) dedicated to serial transmission. |
| Baud rate | The transmission speed expressed in bits per second. |
| Data bits | Specifies the number of data bits. |
| Parity | A transmission error detection method that works by counting the high-state bits and setting a parity bit:none – no parity controleven – an extra bit making the total number of high-state bits evenodd – an extra bit making the total number of high-state bits odd |
| Stop bits | The number of stop bits used to signal the end of a single data frame. |
| Flow control | Selection of the data flow control mechanism to prevent receive buffer overflow:none – no flow controlhardware – hardware flow control using RTS and CTS lines. |
| Timeout | The duration to wait for the transmission operation to complete before throwing an error. |
| Byte order | Specifies the byte storage order of multi-byte data (e.g., uint16_t, uint32_t) in memory or during transmission:little-endian – the least significant byte (LSB) comes firstbig-endian – the most significant byte (MSB) comes first |

CubeMX Configuration for a Given MCU Model
It is not possible to configure parameters in CubeMX for this block.