Contenu principal

Modeling

Prepare model for hardware connection, add blocks to support hardware protocols

Prepare the model for hardware connection using STMicroelectronics Discovery boards, add blocks to support hardware protocols.

Support for STMicroelectronics® Discovery™ boards will be removed in a future release.

You can migrate your models that use STM32F4-Discovery library blocks to use the blocks from the STM32F4xx based block libraries. For more information, see Migrate STMicroelectronics STM32F4-Discovery Blocks to STM32F4xx Based Library Blocks and STMCubeMX Workflow.

Blocks

expand all

System Core

Analog InputMeasure voltage of analog input pin
Digital ReadRead logical state of digital input pin
Digital WriteSet logical state of digital output pin
PWM OutputGenerate square wave on the specified output pin
SCI ReadRead N-by-1 array of data on UART
SCI WriteSend N-by-1 array of data to UART
External InterruptTrigger the downstream function-call subsystem from an Interrupt Service Routine

Multimedia

Audio InputRead audio sample from audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board
Audio OutputSend processed audio samples to audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board

Communication

I2C Controller ReadRead data from I2C Peripheral devices or I2C Peripheral devices register
I2C Controller WriteWrite data to I2C peripheral devices or I2C peripheral devices register
SPI Controller TransferWrite data to and read data from SPI peripheral devices
SPI Register ReadRead data from SPI peripheral devices register
SPI Register WriteWrite data to registers of SPI peripheral devices
Modbus RS485 Client ReadClient device reads data from server device register(s) over RS485 network (Since R2021b)
Modbus RS485 Client WriteClient device writes data to server device register(s) over RS485 network (Since R2021b)
Modbus RS485 Server WriteServer device writes data to server device register over RS485 network (Since R2021b)
Modbus RS485 Server ReadServer device reads data from the server device register over RS485 network (Since R2021b)

Network

TCP ReceiveReceive data over TCP/IP network from remote host
TCP SendSend data over TCP/IP network to remote host
UDP ReceiveReceive UDP packets from UDP host
UDP SendSend UDP packets to UDP host

System Core

Audio InputRead audio sample from audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board
Audio OutputSend processed audio samples to audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board
Digital ReadRead logical state of digital input pin
Digital WriteSet logical state of digital output pin
PWM OutputGenerate square wave on the specified output pin
SCI ReadRead N-by-1 array of data on UART
SCI WriteSend N-by-1 array of data to UART
External InterruptTrigger the downstream function-call subsystem from an Interrupt Service Routine

Multimedia

Audio InputRead audio sample from audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board
Audio OutputSend processed audio samples to audio devices on STMicroelectronics STM32F746G/STM32F769I–Discovery board

Communication

I2C Controller ReadRead data from I2C Peripheral devices or I2C Peripheral devices register
I2C Controller WriteWrite data to I2C peripheral devices or I2C peripheral devices register
SPI Controller TransferWrite data to and read data from SPI peripheral devices
SPI Register ReadRead data from SPI peripheral devices register
SPI Register WriteWrite data to registers of SPI peripheral devices
Modbus RS485 Client ReadClient device reads data from server device register(s) over RS485 network (Since R2021b)
Modbus RS485 Client WriteClient device writes data to server device register(s) over RS485 network (Since R2021b)
Modbus RS485 Server WriteServer device writes data to server device register over RS485 network (Since R2021b)
Modbus RS485 Server ReadServer device reads data from the server device register over RS485 network (Since R2021b)

Network

TCP ReceiveReceive data over TCP/IP network from remote host
TCP SendSend data over TCP/IP network to remote host
UDP ReceiveReceive UDP packets from UDP host
UDP SendSend UDP packets to UDP host

Internet of Things

WiFi TCP ReceiveReceive TCP/IP packets from another TCP/IP host on internet network
WiFi TCP SendSend TCP/IP packets to another TCP/IP host on internet network
ThingSpeak ReadRead data stored in ThingSpeak channel
ThingSpeak WritePublish data to Internet of Things using ThingSpeak

Sensors

HTS221 Humidity SensorMeasure relative humidity and temperature from HTS221 sensor (Since R2025a)
LIS3MDL Magnetometer SensorMeasure magnetic field strength and temperature from LIS3MDL Magnetometer sensor (Since R2025a)
LPS22HB Pressure SensorMeasure barometric air pressure and temperature from LPS22HB sensor (Since R2025a)
LSM6DSL IMU SensorMeasure linear acceleration, angular rate, and temperature from LSM6DSL sensor (Since R2025a)

Utilities Blocks

Byte PackConvert input signals to uint8 vector
Byte Unpack Convert uint8 vector to input signals
Byte ReversalReverse order of bytes in input word
Memory CopyCopy data from and to memory section

Topics

Featured Examples