This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

detect brownout on reset

I would like to detect if a reset happened due to a brownout or an actual power off.

I tired so far using the GPREGRET and RESETREAS registers. They are useful to detect soft resets and distinguish between their causes, but since they are cleared on hard reset and brownout, they are not useful for this case. I tried using the POFCON together with the POWER FAILURE WARNING, which, even on the 2.7V threshold, only gives me about 40 ms to act. But in this time I can't write to pstorage, which takes much longer than that for a write cycle. So I can't store the impending brownout in persistent memory either.

So is there any other way in which I could detect a brownout after a reset?

I am using an NRF51822 with Softdevice s130 v1, and SDK 8.1

Any idea would be appreciated, thanks in advance Dominik

Parents Reply Children
Related