Main Content

Connectivity Peripherals

Configure and use connectivity peripherals such as CAN, FDCAN, I2C, MQTT, SPI, UART/USART and TCP

Create Simulink® models with the connectivity peripherals such as CAN, FDCAN, I2C, SPI, UART/USART, TCP and more available with STM32 processors. Configure the Simulink model to interface with supported target hardware using model configuration parameters. Configure the Simulink model to interface with supported target hardware using model configuration parameters.

Support for STM32 processor based board with Simulink uses STM32CubeMX graphical tool. STM32CubeMX tool is a graphical interface that you can use to configure peripherals of STM32 processors and generate peripheral initialization code for the STM32 processors that you select. You can configure the STM32 Processor-Based Boards to use the STM32CubeMX project with Simulink to generate code and deploy the code to the hardware.

Blocks

expand all

CAN ReadRead message from CAN network (Since R2023a)
CAN WriteWrite data to the CAN Bus (Since R2023a)
FDCAN ReadRead data from CAN FD Bus (Since R2023a)
FDCAN WriteWrite data to the FDCAN Bus (Since R2023a)
I2C Controller ReadRead data from I2C peripheral device or I2C peripheral device register
I2C Controller WriteWrite data to I2C peripheral device or I2C peripheral device register
SPI ReceiveReceive data through Serial Peripheral Interface (SPI) on target (Since R2023a)
SPI TransmitTransmit data through Serial Peripheral Interface (SPI) on target (Since R2023a)
SPI Controller TransferWrite data to and read data from SPI peripheral device (Since R2023a)
UART/USART ReadRead data from the Universal Asynchronous Receiver Transmitter (UART/USART) port (Since R2022a)
UART/USART WriteWrite serial data from the Universal Asynchronous Receiver Transmitter (UART/USART) port (Since R2022a)
TCP ReceiveReceive data over TCP/IP network from remote host (Since R2022b)
TCP SendSend data over TCP/IP network to remote host (Since R2022b)
UDP ReceiveReceive UDP packets from UDP host (Since R2022b)
UDP SendSend UDP packets to UDP host (Since R2022b)
MQTT PublishPublish messages to MQTT broker on specified topic (Since R2024a)
MQTT SubscribeReceive messages from the MQTT broker for specified topic (Since R2024a)

Topics

Featured Examples