Model Configuration Parameters for STM32 Processor Based Boards
Hardware Implementation Pane Overview
Default Hardware Implementation Pane
Configure hardware board to run Simulink® models.
In the Simulink Editor, select Simulation > Model Configuration Parameters.
In the Configuration Parameter dialog box, click Hardware Implementation.
Set the Hardware board parameter to
STM32xxxx Based
.The parameter values under Hardware board settings are automatically populated to their default values.
You can optionally adjust these parameters for your particular use case.
To apply the changes, click Apply.
For more information on selecting a hardware support package and general configuration settings, see Hardware Implementation Pane.
Build Options
Parameter | Description | Default Value |
---|---|---|
Defines how Embedded Coder® responds when you build your model. |
| |
Select the runtime library. | Reduced C | |
Select to compile the generated code and driver source codes in parallel order for faster build and deployment speed. | off | |
Browse to select the STM32CubeMX project file. | ||
Create a STM32CubeMX project for a STM32F4xx Based hardware board. | ||
Click to launch STM32CubeMX tool. | ||
Displays the STM32CubeMX project file. | ||
Displays the device id. | ||
Displays the device family. | ||
Select the connectivity mode | ST link | |
Select the connection port | SWD | |
Select the custom board mode | Normal | |
Select the reset mode | Software reset | |
Select this parameter to auto detect the board to download and run. | on |
Clocking
Parameter | Description | Default Value |
---|---|---|
The CPU clock frequency in MHz. |
|
Connectivity
Parameter | Description | Default Value |
---|---|---|
Show serial configurations | Select to enable serial configurations | disabled |
Select the USART/UART for communication. | USART3 | |
Serial port connectivity | Select the serial port for the device | COM1 |
Show ethernet configurations | Enable ethernet configurations | disabled |
Ethernet port connectivity | Ethernet port number | 17725 |
Show CAN configurations | Enable CAN configurations | disabled |
Module | CAN module | CAN1 |
Baudrate (bits/sec) | Specify the CAN baud rate. | 1000000 |
Read source | Select the CAN read source. | FIFO0 |
Extend CAN ID | Enable to extend CAN ID | disabled |
CAN ID command | Specify the CAN command ID. | 2 |
CAN ID response | Specify the CAN response ID. | 3 |
CAN
Parameter | Description | Default Value |
---|---|---|
Select the CAN module. | CAN1 | |
Baudrate for CAN bus calculated based on data parameters. |
| |
Select this parameter to configure the receive interrupt and its parameters. |
| |
Configure FIFO# interrupt | Select this parameter to configure FIFO interrupt parameters. |
|
Enable FIFO# message pending interrupt | Select this parameter to enable the FIFO# message pending interrupt. |
|
Enable FIFO# full interrupt | Select this parameter to enable the FIFO# full interrupt. |
|
Enable FIFO# overrun interrupt | Select this parameter to enable the FIFO# overrun interrupt. |
|
Configure transmit interrupt | Select this parameter to configure transmit interrupt parameters. |
|
Enable mailbox empty interrupt | Select this parameter to enable the mailbox empty interrupt. |
|
Configure other interrupt | Select this parameter to configure other interrupt parameters such as error warning interrupt, error passive interrupt, bus-off interrupt, last error code, wakeup and sleep acknowledge interrupts. |
|
Enable error warning interrupt | Select this parameter to enable the error warning interrupt. |
|
Enable error passive interrupt | Select this parameter to enable the error passive interrupt. |
|
Enable bus-off interrupt | Select this parameter to enable the bus-off interrupt. |
|
Enable last error code interrupt | Select this parameter to enable the last error code interrupt. |
|
Enable wakeup interrupt | Select this parameter to enable the wakeup interrupt. |
|
Enable sleep acknowledge interrupt | Select this parameter to enable the sleep acknowledge interrupt. |
|
Accept all messages (in FIFO 0) | Enable this parameter to allow all CAN messages in FIFO 0. If it is disabled, then you can select and allow only the required CAN messages. |
|
Filter bank number | Select the filter bank number. |
|
Enable filter bank # | Select to enable the filter bank. |
|
Filter bank # scale | Select the filter bank scale. |
|
Filter bank # mode | Select the filter bank mode |
|
Filter bank # FIFO assignment | Select the filter bank FIFO assignment. |
|
Filter bank # Id type | Select the filter bank Id type. |
|
Id # | Specify the Identifier list value. |
|
Mask # | Specify the Identifier mask value. |
|
Display enabled filter banks configuration in command window | Click to display all the enabled filter banks configuration in MATLAB command window. | |
Disable all filter banks | Click to disable all the filter banks configuration. |
FDCAN
Parameter | Description | Default Value |
---|---|---|
Select the FDCAN module. | FDCAN1 | |
Nominal Baudrate for FD CAN bus calculated based on data parameters. |
| |
Data Baudrate for FD CAN bus calculated based on data parameters. |
| |
Select this parameter to enable the edge filtering for synchronization. |
| |
After Rx FIFO # is full the next message accepted for the FIFO overwrites the oldest FIFO message | Select this parameter to receive message after Rx FIFO # is full the next message accepted for the FIFO overwrites the oldest FIFO message. |
|
Configure receive interrupt sources | Select this parameter to configure the receive interrupt sources and its parameters. |
|
Configure Rx buffer interrupt sources | Select this parameter to configure the Rx buffer interrupt sources and its parameters. |
|
Dedicated RX buffer message | Select the dedicated RX buffer message. Message stored to dedicated Rx buffer interrupt line. |
|
Configure RX FIFO# interrupt sources | Select this parameter to configure RX FIFO # interrupt sources and its parameters. |
|
RX FIFO# new message | Select the RX FIFO# new message interrupt line. |
|
RX FIFO# full | Select the RX FIFO# full interrupt line. |
|
RX FIFO# message lost | Select the RX FIFO# message lost interrupt line. |
|
RX FIFO# watermark | Select the RX FIFO# watermark interrupt line. |
|
High priority message | Select the receive interrupt high priority message interrupt line. |
|
Configure transmit interrupt sources | Select this parameter to configure the transmit interrupt sources and its parameters. |
|
Configure TX FIFO # interrupt sources | Select this parameter to configure TX FIFO # interrupt sources and its parameters. |
|
TX complete | Select the TX complete interrupt line. |
|
TX cancellation finish | Select the TX cancellation finish interrupt line. |
|
TX empty | Select the TX empty interrupt line. |
|
Configure TX event FIFO # interrupt sources | Select this parameter to configure TX event FIFO # interrupt sources and its parameters. |
|
TX event FIFO# new entry | Select the TX event FIFO# new entry interrupt line. |
|
TX event FIFO# full | Select the TX event FIFO# full interrupt line. |
|
TX event FIFO# element lost | Select the TX event FIFO# element lost interrupt line. |
|
TX event FIFO# watermark | Select the TX event FIFO# watermark interrupt line. |
|
Configure other interrupt | Select this parameter to configure other interrupt parameters such as timestamp wraparound, message RAM access failure, timeout occurred, error logging overflow, warning status, error passive status, bus-off status, watchdog event, arbitration protocol error, data protocol error, reserved address access. |
|
Timestamp wraparound | Select the timestamp wraparound interrupt line. |
|
Message RAM access failure | Select the message RAM access failure interrupt line. |
|
Timeout occurred | Select the timeout occurred interrupt line. |
|
Error logging overflow | Select the error logging interrupt line. |
|
Error passive status | Select the error passive status interrupt line. |
|
Warning status | Select the warning status interrupt line. |
|
Bus off status | Select the bus off status interrupt line. |
|
Watchdog event | Select the watchdog event interrupt line. |
|
Arbitration protocol error | Select the arbitration protocol error interrupt line. |
|
Data protocol error | Select the data protocol error interrupt line. |
|
Reserved address access | Select the reserved address access interrupt line. |
|
Configure global filter | Select this parameter to configure global filter and its parameters. |
|
Reject remote frames standard | Select this parameter to reject the remote standard frames. |
|
reject remote frames extended | Select this parameter to reject the remote extended frames. |
|
Non matching frames standard | Select the non matching frames standard. |
|
Non matching frames extended | Select the non matching frames extended. |
|
Configure standard filters | Select this parameter to configure the standard filters and its parameters. |
|
Select standard filter | Select the standard filter. |
|
Filter # configuration. | Select the standard filter configuration. |
|
Filter # type (filter type will be ignored if filter configuration is store into RX buffer) | Select the standard filter type. |
|
Filter # ID1 | Specify the standard filter# ID1. |
|
Filter # ID2 (provide buffer number if filter configuration is store into RX buffer) | Specify the standard filter# ID2 buffer number if filter configuration is store into RX buffer. |
|
Configure extended filters | Select this parameter to configure the extended filters and its parameters. |
|
Select extended filter | Select the extended filter. |
|
Displays configured standard and extended filter configurations in command window | Displays all the configured standard and extended filter configurations in MATLAB command window. | |
Reset standard filter configuration | Click to reset all the standard filter configuration. | |
Reset extended filter configuration | Click to reset all the extended filter configuration. |
UART/USART
Parameter | Description | Default Value |
---|---|---|
Select the USART/UART module to configure. | USART1 | |
Select the transmit mode to configure USART/UART module. |
| |
Select the receive mode to configure USART/UART module. |
| |
Specify the transfer buffer length. | 128 | |
Specify the receive buffer length. | 128 | |
Select to stop receiving data on error until erroneous data is read. | off |
Ethernet
Parameter | Description | Default Value |
---|---|---|
Configures the board to get an IP address from the local DHCP server on the network. |
| |
Defines the local host name. |
Note This parameter is available only when DHCP settings are disabled in STM32CubeMX project. | |
Sets the IP address of the board. | 192.168.1.10
Note This parameter is available only when DHCP settings are disabled in STM32CubeMX project.
| |
Sets the subnet mask for the board. |
Note This parameter is available only when DHCP settings are disabled in STM32CubeMX project.
| |
Sets the gateway required to access the target computer. | 192.168.1.1
Note This parameter is available only when DHCP settings are disabled in STM32CubeMX project.
| |
Defines the physical network address of the board. |
|
ADC#
Parameter | Description | Default Value |
---|---|---|
DMA transfer complete interrupt is enabled by default. | off | |
Watchdog interrupt is enabled by default | off | |
Select Enable regular EoCS interrupt to trigger an ISR from a ADC. | off | |
Select Enable injected EoCS interrupt to trigger an ISR from a ADC. | off | |
Enable Overrun interrupt | Select Enable Overrun interrupt to trigger an notification when overrun occurs. | off |
Run ADC calibration during model initialization | Select Run ADC calibration during model initialization to perform ADC calibration during model initialization to remove any bias. | on |
Calibration method | Select the ADC Calibration method. You can launch automatic calibration or specify calibration registers manually. | Launch automatic calibration |
Calibration mode | Select the ADC Calibration mode. | Offset |
Linear calibration factor word# | Specify the leaner calibration factor word. | 0 |
ADC conversion mode | Select the ADC conversion mode for which you want to launch the calibration. ADC conversion can be single ended or differential or both. | Single ended |
Single ended mode offset calibration factor | Specify the ADC single ended offset calibration factor. | 0 |
Differential ended mode offset calibration factor | Specify the ADC differential ended offset calibration factor. | 0 |
Click Refresh to update configuration parameters according to changes in selected STM32CubeMX project. |
HRTIM
Parameter | Description | Default Value |
---|---|---|
Enable to configure the timers to suspend update events during preload write timers. | off | |
Enable to configure the timers to synchronize counter start timers. | off | |
Select the timers to enable interrupts. | TimerA | |
Select this parameter to enable delayed protection trigger interrupt for the selected higher resolution timer module. | off | |
Select this parameter to enable counter reset/roll-over event interrupt for the selected higher resolution timer module. | off | |
Enable channel# reset interrupt | Select this parameter to enable channel reset interrupt for the selected higher resolution timer module. | off |
Enable channel# set interrupt | Select this parameter to enable channel set interrupt for the selected higher resolution timer module. | off |
Enable capture# event interrupt | Select this parameter to enable capture event interrupt for the selected higher resolution timer module. | off |
Enable update interrupt | Select this parameter to enable update interrupt for the selected higher resolution timer module. | off |
Enable repetition event interrupt | Select this parameter to enable repetition event interrupt for the selected higher resolution timer module. | off |
Enable compare# event interrupt | Select this parameter to enable compare event interrupt for the selected higher resolution timer module. | off |
Enable register update event | Select this parameter to enable register update event for the selected higher resolution timer module. | off |
Enable synchronization update event | Select this parameter to enable synchronization update event for the selected higher resolution timer module. | off |
Enable DLL calibration done interrupt | Select this parameter to enable DLL calibration done interrupt for the selected higher resolution timer module. | off |
Enable burst period completed interrupt | Select this parameter to enable burst period completed interrupt for the selected higher resolution timer module. | off |
Enable system fault interrupt | Select this parameter to enable system fault interrupt for the selected higher resolution timer module. | off |
Enable fault# interrupt | Select this parameter to enable fault interrupt for the selected higher resolution timer module. | off |
SPI
Parameter | Description | Default Value |
---|---|---|
Enable to configure the timers to suspend update events during preload write timers. | SPI1 | |
Enable TX interrupt | Select this parameter to enable SPI transmit interrupt. | off |
Enable RX interrupt | Select this parameter to enable SPI receive interrupt. | off |
Enable error interrupt | Select this parameter to enable SPI error interrupt. | off |
Select this parameter to enable SPI transmit FIFO ready interrupt. | off | |
Select this parameter to enable SPI receive FIFO ready interrupt. | off | |
Select this parameter to enable SPI transmit or receive FIFO ready interrupt. | off | |
Select this parameter to enable the SPI transmit failed interrupt. | off | |
Enable underrun interrupt | Select this parameter to enable the SPI underrun interrupt. | off |
Enable overrun interrupt | Select this parameter to enable the SPI overrun interrupt. | off |
Enable CRC error interrupt | Select this parameter to enable the SPI CRC error interrupt. | off |
Enable TI frame interrupt | Select this parameter to enable the SPI TI frame interrupt. | off |
Enable mode fault interrupt | Select this parameter to enable the SPI mode fault interrupt. | off |
Enable end transfer interrupt | Select this parameter to enable the SPI end transfer interrupt. | off |
Enable master mode interrupt | Select this parameter to enable the SPI controller mode interrupt. | off |
Enable TxFIFO empty interrupt | Select this parameter to enable the SPI transmit FIFO empty interrupt. | off |
Enable TSER interrupt | Select this parameter to enable the SPI TSER interrupt. | off |
Timers
Parameter | Description | Default Value |
---|---|---|
Select the timer group. | Advanced Timers 1/8/20 | |
Show TIM# configurations | Select the timer module for configurations. | off |
Start timer during model initialization | Select this parameter to start the counter during model initialization. | on |
Select to enable trigger interrupt. | off | |
Select to enable capture compare interrupt. | off | |
Select to enable update interrupt. | off | |
Select to enable break interrupt. | off | |
Enable Communication Interrupt | Select to enable commutation interrupt. | off |
Enable Index Interrupt | Select to enable index interrupt. | off |
Enable Direction Interrupt | Select to enable direction interrupt. | off |
Enable Transition Error Interrupt | Select to enable transition error interrupt. | off |
Enable Index Error Interrupt | Select to enable index error interrupt. | off |
External Mode
Parameter | Description | Default Value |
---|---|---|
Sets the transport layer used to exchange data between host and hardware. |
| |
Specify the logging buffer size. | 1024 | |
Enable the parameter to use a dedicated timer to improve the time stamp accuracy. | on | |
Sets to view external mode execution progress and updates. |
|
PIL
Parameter | Description | Default Value |
---|---|---|
Select the interface used for PIL communication. |
|
CORDIC
Parameter | Description | Default Value |
---|---|---|
Specify the input buffer length in bytes. |
| |
Specify the output buffer length in bytes. |
|
MQTT
Parameter | Description | Default Value |
---|---|---|
Broker IP Address | MQTT broker web address | <Enter Broker I.P. Address> |
Port | TCP/IP port to use for the MQTT connection. | 1883 |
Client username | User name for MQTT broker to authenticate the client. | <null> |
Client password | Password for MQTT broker to authenticate the client. | <null> |
Client ID | A unique identifier for the client that is connected to the MQTT broker. | <null> |
I2S
Parameter | Description | Default Value |
---|---|---|
Use PDM filter from STM32CubeMX | Enable this parameter to utilize the PDM filter configuration from the STM32CubeMX. | off |
Configure PDM2PCM channel(s) for I2S# | Select the I2S channel to configure PDM2PCM. | off |
PDM2PCM channel for stream 1/2 | Specify the I2S PDM2PCM channel configured in the STM32CubeMX project. | 1 |
SD card logging
Parameter | Description | Default Value |
---|---|---|
Select to enable MAT file logging on SD card. | off | |
Select the SD card logging interface. |
| |
Enable logging status on GPIO | Select to enable GPIO logging status on SD card. | off |
GPIO group for SDC logging status | Select the GPIO group for SDC logging status. | GPIOA |
GPIO pin for SDC logging status | Select the GPIO pin for SDC logging status. | 1 |