Skip to main content
Saredo
Associate III
December 22, 2020
Solved

Is STM32F412VET6 on-the fly firmware update possible?

  • December 22, 2020
  • 5 replies
  • 2278 views

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)?

This topic has been closed for replies.
Best answer by Tesla DeLorean

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.​

5 replies

Bowman32
ST Employee
December 23, 2020

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
SaredoAuthor
Associate III
December 23, 2020

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

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
December 23, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Saredo
SaredoAuthor
Associate III
December 23, 2020

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?

Tesla DeLorean
Guru
December 23, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Bowman32
ST Employee
December 23, 2020

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
SaredoAuthor
Associate III
December 30, 2020

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

Technical Moderator
January 4, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks