2020-12-22 06:23 AM
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)?
Solved! Go to Solution.
2020-12-23 04:02 AM
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.
2020-12-23 02:59 AM
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
2020-12-23 03:45 AM
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
2020-12-23 04:02 AM
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.
2020-12-23 05:54 AM
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?
2020-12-23 06:03 AM
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.
2020-12-23 07:48 AM
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
2020-12-30 07:04 AM
Thank you for your answers @Community member @Bouraoui Chemli
2021-01-04 04:14 AM
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