Main Content

Model Configuration Parameters for STM32 Processor Based Boards

Hardware Implementation Pane Overview

Default Hardware Implementation Pane

Model Configuration

Configure hardware board to run Simulink® models.

  1. In the Simulink Editor, select Simulation > Model Configuration Parameters.

  2. In the Configuration Parameter dialog box, click Hardware Implementation.

  3. Set the Hardware board parameter to STM32xxxx Based.

  4. 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.

  5. 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

ParameterDescriptionDefault Value

Build action

Defines how Embedded Coder® responds when you build your model.

Build, load, and run

Runtime library

Select the runtime library.

Reduced C

Disable parallel build

Select to compile the generated code and driver source codes in parallel order for faster build and deployment speed.

off

Browse

Browse to select the STM32CubeMX project file.

 

Create

Create a STM32CubeMX project for a STM32F4xx Based hardware board.

 

Launch

Click to launch STM32CubeMX tool.

 

STM32CubeMX project file

Displays the STM32CubeMX project file.

 

Device id

Displays the device id.

 

Device family

Displays the device family.

 

Connectivity mode

Select the connectivity mode

ST link

Auto detect board to download and run

Select this parameter to auto detect the board to download and run.

on

Device list

If Auto detect board to download and run parameter is not selected, you can select the hardware boards from the Device list or click Scan to detect hardware boards connected over st-link. You can also choose the custom boards from the device list.

 

Scan

Click Scan to detect all the hardware boards connected over st-link.

 

Clocking

ParameterDescriptionDefault Value

Clocking

The CPU clock frequency in MHz.

216

Connectivity

ParameterDescriptionDefault Value

USART/UART

Select the USART/UART for communication.

USART3

Serial port

Sets the serial port on the hardware board.

COM1

UART/USART

ParameterDescriptionDefault Value

Configure UART/USART#

Select the USART/UART module to configure.

USART1

Transmit mode

Select the transmit mode to configure USART/UART module.

Buffered mode using TXE interrupt

Receive mode

Select the receive mode to configure USART/UART module.

Buffered mode using RXNE interrupt

Transfer buffer length

Specify the transfer buffer length.

128

Receive buffer length

Specify the receive buffer length.

128

Stop receiving data on error until erroneous data is read

Select to stop receiving data on error until erroneous data is read.

off

Ethernet

ParameterDescriptionDefault Value

Enable DHCP for local IP address assignment

Configures the board to get an IP address from the local DHCP server on the network.

off

Ethernet host name

Defines the local host name.

STM32xx

Note

This parameter is available only when DHCP settings are disabled in STM32CubeMX project.

Board IP address

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.

Subnet mask

Sets the subnet mask for the board.

255.255.255.0

Note

This parameter is available only when DHCP settings are disabled in STM32CubeMX project.

Gateway

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.

MAC address

Defines the physical network address of the board.

00:80:E1:00:00:00

ADC#

ParameterDescriptionDefault Value

DMA transfer complete interrupt is enabled

DMA transfer complete interrupt is enabled by default.

off

Watchdog interrupt is enabled

Watchdog interrupt is enabled by default

off

Enable Regular EoCS interrupt

Select Enable regular EoCS interrupt to trigger an ISR from a ADC.

off

Enable Injected EoCS interrupt

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 lauch 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

Refresh

Click Refresh to update configuration parameters according to changes in selected STM32CubeMX project.

 

HRTIM

ParameterDescriptionDefault Value

Suspend update events during preload write timers select

Enable to configure the timers to suspend update events during preload write timers.

off

Synchronized counter start timers select

Enable to configure the timers to synchronize counter start timers.

off

Enable interrupts select

Select the timers to enable interrupts.

TimerA

Enable delayed protection trigger interrupt

Select this parameter to enable delayed protection trigger interrupt for the selected higher resolution timer module.

off

Enable counter reset/roll-over event interrupt

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

Timers

ParameterDescriptionDefault Value

Timer group

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

Enable Trigger Interrupt

Select to enable trigger interrupt.

off

Enable Capture Compare # Interrupt

Select to enable capture compare interrupt.

off

Enable Update Interrupt

Select to enable update interrupt.

off

Enable Break Interrupt

Select to enable break interrupt.

off
Enable Commutation 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 InterruptSelect to enable transition error interrupt.off
Enable Index Error InterruptSelect to enable index error interrupt.off

External Mode

ParameterDescriptionDefault Value

Communication interface

Sets the transport layer used to exchange data between host and hardware.

Serial

Logging buffer size (in bytes)

Specify the logging buffer size.

1024

Use a dedicated timer to improve time stamp accuracy

Enable the parameter to use a dedicated timer to improve the time stamp accuracy.

on

Verbose

Sets to view external mode execution progress and updates.

on