cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert the code from one MCU to another MCU on the same series?

PMana.1
Associate II

I am working on a project and the example is written for STM32L476RG. I would like to use some other STM32 mcus for my product such as STM32L486RG, STM32L496RG, STM32L4A6RG. Could you please help me to know, would this code run on the above-mentioned mcus without making any changes to the code? Do I need to make any changes for the libraries to make this work? What all changes are to be made for the code to work. I am using almost all the peripherals.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

In general, in moving to a more capable chip within the same family, your code should run without modification. It's not a hard rule, however, and there are exceptions.

The STM32L486RG is just a STM32L476RG + CRYPTO, so the code will run there without modification.

The STM32L496RG has more RAM and FLASH and some extra peripherals, but should otherwise be compatible. Code should run without modification unless you're doing FLASH modifications. But I can't be 100% on that.

STM32L4A6RG = STM32L496RG + crypto, so code is compatible between those except for crypto functions.

Doing a diff on the relevant CMSIS header files can expose the differences in detail.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

In general, in moving to a more capable chip within the same family, your code should run without modification. It's not a hard rule, however, and there are exceptions.

The STM32L486RG is just a STM32L476RG + CRYPTO, so the code will run there without modification.

The STM32L496RG has more RAM and FLASH and some extra peripherals, but should otherwise be compatible. Code should run without modification unless you're doing FLASH modifications. But I can't be 100% on that.

STM32L4A6RG = STM32L496RG + crypto, so code is compatible between those except for crypto functions.

Doing a diff on the relevant CMSIS header files can expose the differences in detail.

If you feel a post has answered your question, please click "Accept as Solution".
Imen.D
ST Employee

Hello @PMana.1​ ,

There are many resources that analyze the steps required to migrate between STM32L4 series considering the migration of hardware, device (s) and firmware.

I hope these resources are helpful for you.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen