cancel
Showing results for 
Search instead for 
Did you mean: 

We are using STM32L476 in our application in which we have seen accidental change in RDP level when battery voltage drops below 0%. Is there any corner case we should take care?

kpate.11
Associate II

In code, we do not have call for changing RDP but we have a logic to reset IWDG_STOP bit after wakeup from sleep mode.

We are facing this option byte corruption problem when battery drops below 0%. (We do not have HW support for cutting off power for MCU when battery drops below 0%).

Is there any limitation for modifying option byte or erase/read/write flash (IAP mode) and VCC level. ? Can drop in voltage during ongoing flash read/write/erase operation corrupt Option byte?

13 REPLIES 13
Uwe Bonnes
Principal III

Power loss or hickup during NVM write is always a problem. NVM write needs a certain voltage range. if you "below 0 %" situation violates this level, bad things may happen.

KnarfB
Principal III

If the nominal bat. voltage is x volts, 0% are 0 volts. But, what does "below 0%" mean?

Are you using BOR?

kpate.11
Associate II

@KnarfB​ We are not using BOR. Below 0% means below 3.3 where we have observed remaining capacity of battery is <0% (This number is from fuel gauge data), but the actual voltage of battery remains in range of 2.8v to 3.3v.

@Uwe Bonnes​ But as far as I remember to write to option byte, it has to be unlocked first then only write to it becomes possible.

> We are not using BOR.

Then do.

JW

Piranha
Chief II

> STM32F476

There is no such MCU.

> we have a logic to reset IWDG_STOP bit after wakeup from sleep mode.

Why? DBG_IWDG_STOP bit is for debugging. How is it related to sleep mode in your code?

kpate.11
Associate II

My Bad. Its STM32L476.

Uwe Bonnes
Principal III

If you have a fuel gauge shut down before reaching 0 %.

kpate.11
Associate II

@Piranha​ We are using software watchdog and STOP2 mode for power saving. So in stop2 mode if watchdog is enabled and IWDG_STOP bit is not reset then it keeps waking up the MCU.

kpate.11
Associate II

@Uwe Bonnes​ Yes we can do that. But my question is doing flash read/write operation in abnormal power condition can corrupt option byte?