2022-02-15 07:10 AM
Hi There
In our project we would like to change the MCU Type from MCU Type NIHx to BGTx. As far as I can see there should not be any conflicts with exception of the Flash size. As we do not need more than the 1MB this is not a problem for us.
Is it correct, that the exact same processor type is build in with different casing? Do I forget something or is it correct that I can leave all pins and cofiguration the same?
Whats the easiest way to change the mcu type in CubeMX
Kind Regards
Solved! Go to Solution.
2022-02-15 08:54 AM
Hi Sara
Thanks for the quick answer. The List Pinout Compatible MCUs is a cool tool but it does not work for other packages and the change from NIH to BGT. But still the MCU behind is exactly the same and the datasheet is also the same for both MCUs. The project import worked good.
I found another way: I changed one line in the .ioc file with a texteditor:
and then opened the file with CubeMX. The new MCU and kofiguration was accepted by the CubeMX. Is there any reason why not just changing the MCU like this?
Kind Regards
2022-02-15 08:11 AM
Hello @Community member ,
Thanks for your feedback,
Actually, there is an easy method in CubeMX to import a previously-saved configuration to another MCU using the import Project window. This will create a new project with the same config but for different MCU. This method does not copy the added code as well, it just copies the config so you need to add it manually in your new project,
Please check STM32CubeMX user manual UM1718 section 4.10, it contains more details about the Import Project Window.
There is also another method using List Pinout Compatible MCUs available under Pinout-> List Pinout Compatible MCUs. You just need to edit the filter, click on search then select the wanted MCU and finally click on Import. This will also create a new project with the same previous config and it does not copy the added code or files created by the user. So you have to add it manually just like in the previous method.
I hope this helps !
If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)
Sara.
2022-02-15 08:54 AM
Hi Sara
Thanks for the quick answer. The List Pinout Compatible MCUs is a cool tool but it does not work for other packages and the change from NIH to BGT. But still the MCU behind is exactly the same and the datasheet is also the same for both MCUs. The project import worked good.
I found another way: I changed one line in the .ioc file with a texteditor:
and then opened the file with CubeMX. The new MCU and kofiguration was accepted by the CubeMX. Is there any reason why not just changing the MCU like this?
Kind Regards
2022-02-16 01:40 AM
Hello @Community member ,
It is actually a little bit risky to do such thing but only when the MCUs are not from the same serie. In your case, it is absolutely safe.
Sara.