Question
STM32 is getting stuck/frozen and enables read-out protection at runtime
Hi STM team,
We are using the stm32L476ZET6 microcontroller and developed our custom-embedded device, which operates on the backup battery (4.4V) as well as on an external constant DC (12V) supply. So far, we got good results for our business use case with this stm32L476ZET6 microcontroller. Recently we observed one of the blocker issues in the long run and it is affecting our field deployment, hence this issue is a very critical issue for us and we need your quick support for the same.
Background :
As per our business use case, if the user removes the external supply then our device runs on a backup battery (4.4 V) for a few defined minutes and then goes into deep sleep mode. So we have defined a few wake-up events to wake the device and report the data to the cloud. This way our device runs in the long run on a backup battery.
As per our business use case, if the user removes the external supply then our device runs on a backup battery (4.4 V) for a few defined minutes and then goes into deep sleep mode. So we have defined a few wake-up events to wake the device and report the data to the cloud. This way our device runs in the long run on a backup battery.
Problem Statement :
Recently, in the long run on a backup battery power supply, we observed some of the devices woken up on wake-up events and then went into stuck/frozen. Please note, for a long, all those devices were working fine before this issue was observed. We did the RCA (ST-link) and observed that MCU had its RDP (Read-out Protection ) flag set from level-0 (AA) to (FF).
We need your help to resolve the below queries.
1. From the software perspective we are configuring just 2 option bytes - IWDG_STOP at the bootup & BFB2 at the time of OTA upgrade/flash. As this MCU is running on a backup battery, is are any chance while performing the option byte configurations due to power fluctuation MCU triggers the RDP to set 0XFF to protect the flash from corruption?
2. We went through the user manual of STM32 but we couldn't find in what situations MCU can set this RDP flag to 0XFF. Can you please help to identify the possible cases?
3. There are many places in our software where we access the MCU Flash right after it gets powered up. Is there any chance that due to power fluctuations/low battery, these places get hit multiple times and can corrupt the MCU flash operation which eventually can set the RDP flag to 0XFF?
4. Is there any specific power sequence in the MCU that can trigger the RDP set issue? Because from code we are not accessing the RDP bit.
5. In existing software, we do not have any voltage check to perform any flash operations. Do you recommend one should have a voltage threshold defined to perform flash operations to protect the MCU flash from getting corrupted?
6. At what voltage level STM32 can handle the successful flash operation? Does it have any voltage limits defined? Are there chances that below a certain voltage level if the user tries to access flash, it enables the RDP flag to protect the chip?
Since this is a major blocker issue, your early inputs will help a lot to reach at some level. Let us know If you need any further information on top of this.
Thanks
Vidhi V.
