Main Content

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:

  1. Open the Simulink model in which you are migrating block usage.

  2. From Configuration Parameters > Hardware Implementation, note that the Hardware board selection is STM32F4-Discovery.

    Hardware board selection is STM32F4-Discovery

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

    Hardware board selection is STM32F4xx Based

  4. 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_Output selected for pin PA0) for the migrated Digital Port Write block mask selection GPIOA[0].

    Digital Port Write block mask

    CubeMX configuration for the migrated Digital Port Read block

See Also

Topics