cancel
Showing results for 
Search instead for 
Did you mean: 

Is STM32F412VET6 on-the fly firmware update possible?

Saredo
Associate III

Hello,

I'm working with a STM32F412. In my process, the STM32 will receive a firmware. The idea is to flash this firmware (that is in RAM) to the STM32 for it to execute after a reset. I don't know if it is possible.

If it is not, what are the properties I should look for to be able to do so with a STM32 (if I have to change microcontroller)?

1 ACCEPTED SOLUTION

Accepted Solutions

Doing IAP (In App Programming) is NOT predicated on having dual bank flash or a place to stage the new image, it just makes it easier and safer.

You can write your own loader / updater that can remain in the first 16KB flash section and manage the rest of the process from there.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

8 REPLIES 8
Bouraoui Chemli
ST Employee

Hello @Saredo​ 

You can update the STM32 firmware on-the fly using FOTA (Firmware over the air) technique.

You can also refer to AN4767 application note "On-the-fly firmware update for dual bank STM32 microcontrollers"

Bouraoui

Saredo
Associate III

Thank you for answer. I have seen this application note. But the STM32F412VET6 does not seem to have a dual bank.

I would like to confirm that it is only possible to do an update of the firmware using FOTA with an MCU which has a dual bank memory.

Thank in advance

Doing IAP (In App Programming) is NOT predicated on having dual bank flash or a place to stage the new image, it just makes it easier and safer.

You can write your own loader / updater that can remain in the first 16KB flash section and manage the rest of the process from there.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Saredo
Associate III

Thanks @Community member​ i will search how to that.

But just to be sure I understood well: you mean that I can jump from my main code to this loader code, then in this loader write in flash a new main programm (that is in my RAM) and restart?

The MCU does what you instruct it to do. You can stage updates and code in SRAM if you want or do it differently.

I'd always keep a minimal boot loader in place to permit validation and recovery to occur. How large that needs to be depends on how complex the recovery process needs to be.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Bouraoui Chemli
ST Employee

Hi @Saredo​ 

I would like to clarify that is always possible to do an update of the firmware using FOTA with all STM32 (MCU which has single or dual bank memory). You can implement FOTA technique based on application note AN3965 "STM32F40x/STM32F41x in-application programming using the USART" just by adding USART to wireless module. Indeed, as said by @Community member​  in your case (single bank) "You can write your own loader / updater that can remain in the first 16KB flash section and manage the rest of the process from there".

Bouraoui

Saredo
Associate III

Thank you for your answers @Community member​  @Bouraoui Chemli​ 

Hi @Saredo​ ,

Please mark the answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

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