Migrate From STM32F4-Discovery Library to STM32F4xx Based Boards Library Digital Port Write Block Usage
When you migrate from STM32F4-Discovery GPIO Write block usage to using an STM32F4xx Based Boards Digital Port Write block usage, use this workflow.
These example steps show the process for migrating from the STM32F-Discovery library GPIO Write block to the STM32F4xx Based Boards library Digital Port Write block:
Open the Simulink model in which you are migrating block usage.
From Configuration Parameters > Hardware Implementation, note that the Hardware board selection is STM32F4-Discovery.

Change Hardware board selection to STM32F4xx Based. After the dialog box updates to match this selection, From Target hardware resources > Build options, use the Browse or Create buttons to select an STM32CubMX project file.

In the Simulink model, replace the GPIO Write block from the STM32F4-Discovery library with a Digital Port Write block from the STM32F4xx Based Boards library. Because the block masks are identical, you can use the same block parameters from the STM32F4-Discovery block for the STM32F4xx Based Boards block.
For example, use the indicated CubeMX configuration (
GPIO_Outputselected for pinPA0) for the migrated Digital Port Write block mask selectionGPIOA[0].

See Also
Topics