Migrate From STM32F4-Discovery Library to STM32F4xx Based Boards Library Digital Port Read Block Usage
When you migrate from STM32F4-Discovery GPIO Read block usage to using an STM32F4xx Based Boards Digital Port Read block usage, use this workflow.
These example steps show the process for migrating from the STM32F-Discovery library GPIO Read block to the STM32F4xx Based Boards library Digital Port Read 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 Read block from the STM32F4-Discovery library with a Digital Port Read 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_Inputselected for pinPA0) for the migrated Digital Port Read block mask selectionGPIOA[0].

See Also
Topics