2022-01-11 05:53 AM
Hi,
I try to use the SBSFU in a project with a STM32F722 and so far it works to flash an initial firmware. Now what I would like to do is to update the firmware and for that, since I can only use one image because of the limited flash size, I corrupt the flash from the application level and trigger then a restart.
After the restart, I can see the following:
It seems to erase the flash, but when I then have a look at the flash, everything is 0x0000 instead of 0xFFFF and I cannot update the flash anymore. Also the SVC_NVIC_SystemReset(); does only restart the application and not the bootloader, and I really don't want to restart a damaged application.
What I further would like to achieve is to boost the startup behaviour of the bootloader and this can be achieved according the referenece manual by stop checking the flash for corruption, but then I could not really use the method from above to destroy the firmware image, right?
What I would like to do with the SBSFU is the following:
Can I somehow achieve this and if so, how can I say the SBSFU to only check for the header corruption and erase the whole sector?
2022-02-02 12:45 PM
Hello @STsch.1
There is no need to corrupt your firmware to force the installation of a new one.
In the example you have started from, there is an input GPIO connected to the user button that allows the forcing of the update. Pressing user button on startup will activate the update.
This activation can be also done by the application firmware itself by using a magic in SRAM for instance. Application writes this magic, and resets. SBSFU will read this specific SRAM location and will trigger an update. An implementation of this method is provided in the WB55 One image to activate the standalone loader.
Best regards
Jocelyn