Reset or glitch during Option Byte programming
We have a design based on the STM32G0B1CET6 MCU.
Recently we noticed some failing parts after power on/off testing. Symptoms: software is no longer running and the SWD port is not responding. We sent the broken parts to ST for analysis. The report (C241043257) showed that the FLASH status register has bit 15 (OPTVERR) set. This indicates a mismatch on option byte loading, which can be caused by a reset or glitch during the option byte programming phase.
After analyzing our code, we found that at each startup the firmware writes 0xBB to the RDP option byte.
We are quite sure this caused the issue, but what we would like to have confirmed is:
If 0xBB is written to the RDP option byte, while is already set to 0xBB – will that still make the chip vulnerable to a reset or instable power supply?
A related question:
At the end of a firmware update, we do a bank swap, which requires writing to an option byte. That will also introduce a brief moment where the chip can be bricked if power supply is unstable. I know the manual warns against this, but is there a way to eliminate this risk?
