SBSFU - flash erase 0x0000 instead of 0xFFFF
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:
- I destroy the image header by writing 0x0000 into the flash
- I trigger a restart and the bootloader starts again
- The bootloader detects an invalid flash header (no need to check for corrupt flash over the whole sector)
- The bootloader erases the WHOLE application sector (I don't need the anti-rollback check)
- After this, I can flash a new firmware as it works initially.
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?
