cancel
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

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

Under Pinout Menu select “List Pinout Compatible MCUs”.
1814.png
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”).
1815.png
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:
1816.png
“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:
1817.png
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:
1818.png
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”.
1819.png
We now have our project configuration transferred to a fully compatible STM32 part number.
1820.png
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: