Skip to Content
Block descriptionsHost - SerialHost Serial Setup

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.



Host Serial Setup block

Table of Contents

Inputs

This block does not have any inputs.

Outputs

This block does not have any outputs.

Block Parameters

ParameterDescription
Communication portSelection of the communication port (COM) dedicated to serial transmission.
Baud rateThe transmission speed expressed in bits per second.
Data bitsSpecifies the number of data bits.
ParityA transmission error detection method that works by counting the high-state bits and setting a parity bit:
none – no parity control
even – an extra bit making the total number of high-state bits even
odd – an extra bit making the total number of high-state bits odd
Stop bitsThe number of stop bits used to signal the end of a single data frame.
Flow controlSelection of the data flow control mechanism to prevent receive buffer overflow:
none – no flow control
hardware – hardware flow control using RTS and CTS lines.
TimeoutThe duration to wait for the transmission operation to complete before throwing an error.
Byte orderSpecifies 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 first
big-endian – the most significant byte (MSB) comes first


Parameters for Host Serial Setup block

CubeMX Configuration for a Given MCU Model

It is not possible to configure parameters in CubeMX for this block.

See Also

Last updated on