SBSFU: A low supply voltage event seems to clear the firmware
Hi,
I have a product which runs an application that uses SBSFU on a STM32. The product is battery powered by a small battery. After the small battery is almost depleted, it charges itself by drawing power from a larger external battery. If however that external battery is also empty, eventually the supply of the microcontroller will drop to below operational voltage.
If this happens however, then when the external battery is replaced and the supply voltage is restored, SBSFU logs the following:
= [SBOOT] System Security Check
= [SBOOT] System Security Check successfully passed. Starting...
======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================
= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Hardware reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK KMS BLOB TO INSTALL
= [SBOOT] STATE: CHECK USER FW STATUS
No valid FW found in the active slots nor new FW to be installed
Waiting for the local download to start...
= [SBOOT] STATE: DOWNLOAD NEW USER FIRMWARE
File> Transfer> YMODEM> Send .........
So for some reason, after the supply voltage has dropped below a valid operational voltage, it seems that my firmware is deleted for some reason. There is nothing wrong with my hardware, I can reflash with the STM32CubeProgrammer and then everything returns back to normal.
I'm completely mystified by this, how can it be that a too low supply voltage seemingly deletes what is in the flash?
This is a huge problem for me, as I cannot avoid this, and products that experience this cannot be restored remotely with OTA. So this means a product recall.
@Jocelyn RICARD Do you perhaps have an idea what can cause this?