How do I find out, that the battery was inserted into my system? = find out the difference between power up and reset after shutdown/standby mode ( G031 )
We have a battery driven system based on STM32G031K8 and a S2-LP for RF running from a CR2032.
I use the shutdown mode to keep power as low as possible. System is done by a reed contact connected to a wake up pin.
We want to find out, whether the battery was entered, or the system reset was caused by exiting the shutdown mode.
Further on, we use the standby mode and we want to know when the reset occurs, whether it was caused by exiting the shutdown mode or by exiting the standby mode.
As both modes do a reset on exiting, I see no difference at the moment.
Any ideas?
Furthermore, when the battery is getting low, the processor does some resets, when the battery voltage drops below 1.7V and after some time, the battery recovers a little bit.
Any ideas how to find out the difference betweeen that. Hence the battery voltage is not a good indicator, I already tried that.
