on
2021-11-30
1:34 AM
- edited on
2025-08-06
4:42 AM
by
Laurids_PETERSE
In the field of embedded systems, it is very common to migrate an existing design from one STM32 microcontroller to another in response to changing application requirements. These changes can be dependent on, for example, flash memory, SRAM, GPIO count, or peripheral features. Fortunately, this transition can be performed easily and efficiently using the STM32CubeMX tool. In this article, we guide you step by step on how to migrate from one STM32 microcontroller to another using STM32CubeMX.
Software: STM32CubeMX version 6.14.1
The STM32CubeMX tool permits opening a project from another STM32 part number in the same family. For example, you can open a project created for an STM32F407 with an STM32F429 part number. This allows for easy migration from one part number to another within the same STM32 family. In this article, we guide you step by step on how to perform this migration.
To begin, we create a project with the STM32F407VGTx:
A window opens as shown in the screenshot below:
Add some peripherals and their associated configurations to our project. For example, we can add two ADC channels:
We also add a timer with a PWM output channel:
Let us also add I2C communication:
GPIO output: Click on PD4 and choose “GPIO_Output”
GPIO input: Click on PD15 and choose “GPIO_Input”
EXTI (external interrupt): Click on PA7 and choose “GPIO_EXTI7”
Now, let us save this example configuration:
We switch and load the project configuration onto another STM32 of the same series:
We select an STM32 belonging to the same series (STM32F4). As an example, you can select the STM32F429ZITx:
A window opens as shown in the screenshot below:
Now, we import our previous project:
A window opens as shown in the screenshot below:
A window opens as shown in the screenshot below which contains an important remark:
This message indicates that the MCU (STM32F407VGTx) found in the project being imported is not the same as the MCU (STM32F429ZITx) currently edited.
The tool returns that the importing project is completed as shown in the screenshot:
A pop-up is displayed indicating that the project has been successfully imported:
We have now completed the import of the configuration for the STM32F407 to the STM32F429:
Migrate from one STM32 to another using STM32CubeMX is simple and fast. By following these steps, you can easily transfer your configurations without starting from scratch, saving both time and effort.
Hi,
I am also working on the STM32H743ZI2 board. Can you please help to provide the IOC file of ethernet default code for the same.
This will very beneficial to us to move ahead.
Regards,
Tajwar
Project Import failed: Import 'STM32H747AIIx' not supported (multiple context)