modelBlink

Diagram of Blink

Extends from Modelica.Icons.Example.

Information

Blink

Blink is a very simple STM model, which simply toggles the built-in LED on the board on and off at the given frequency (this version blinks at a frequency given by the model using single precision floating point; it is also possible to simply flip the LED bit in each time step which gives a more accurate result). Use this model to see if your Modelica tool can export code for STM32F4 MCUs.

STM digital pin 12 on port D corresponds to digital pin D12 on the STM32F4-Discovery. The user LED's are accessed via convenient LED Block. If desired, you can connect an external LED to this PIN, with a suitable resistor in-between (perhaps 220Ω). Connect the other PIN on the LED to ground.

Components

TypeNameDefaultDescription
Modelica_DeviceDrivers.EmbeddedTargets.STM32F4.Blocks.Microcontrollermcu
Blocks.Ledled
Modelica.Blocks.Sources.BooleanExpressionboolExp
Blocks.SynchronizeRealtimesynchronizeRealtime