Showing results for 
Search instead for 
Did you mean: 

How to export a project configuration to a compatible STM32

ST AME Support NF
ST Employee

How to export a project configuration to a compatible STM32

1. Introduction

For various reasons, a particular STM32 part number selected for a project may not be available in the desired time frame. In this case, you will then need to find a compatible STM32. In this article we will see how to use STM32CubeMX to do this.

2. Pre-requisite

  • Software: STM32CubeMX

3. Theory

First an STM32CubeMX project will be created for a microcontroller, let’s pick an STM32G031F4 for example. Then some configuration will be added to it, and then we will find out what STM32 part numbers are compatible for this configuration.

4. Steps

First, create a Project for a STM32G031F4
  1. Open STM32CubeMX

  2. Build the Configuration for the STM32G031F4P

Now let’s build our project configuration. As an example, we will add one SPI Full Duplex.
Now let’s also add one UART:
Let’s save this example configuration and name it STM32G031F4_Project_V1.
Now we will look for compatible STM32 for this project.
  1. Compatible STM32

Under Pinout Menu select “List Pinout Compatible MCUs”.
This will open a “Pinout Compatible” window listing the  STM32 part numbers that are fully compatible (“Full Compatible”) and those that are compatible with some hardware changes (“Need HW Change”).
You can adjust the search by enabling or disabling options regarding:
  • Pinning Status: x to ignore pin status (locked pins)
  • Power Pins: to consider or not the power pins
  • System Pins: to consider or not the system pins
“Full Compatible” are exact matches and displayed in blue:
“Need HW change” are partially compatible -- all the Hardware resources are available, but some pins need to be changed. These parts are listed in yellow:
If you want to find out what needs to be changed on one particular STM32 part number from the “Need HW change” list, put your mouse cursor over the desired part number and look at the popup message that explains the differences.
For example:
Now select an STM32 and automatically import the configuration. For example, we will choose the STM32G051F8Px by selecting it with the left click of your mouse and then click “OK, Import”.
We now have our project configuration transferred to a fully compatible STM32 part number.
We can also see at the bottom of the window the list of compatible STM32s.
If you want to load the current configuration again to another STM32, just double click on one of the STM32 part numbers from the list.

5. Links

STM32CubeMX - STM32Cube initialization code generator - STMicroelectronics
Version history
Last update:
‎2021-11-30 01:38 AM
Updated by: