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

Differentiating between brown-out vs initial power-up

Hi,

I am using the nrf51822 in an intermittent high-current application where if the battery is close to dead, will sometimes cause the chip to reset because the voltage is dropping below ~1.7V. The battery recovers and the chip starts running again.

Is it possible to determine whether a reset is caused by low voltage versus a complete battery change? I believe that RESETREAS will equal 0 in either case.

Any easy way to do this?

Thanks.

Parents
  • Hi Chris

    I think you are correct, you can not know internally in the chip if the reset was caused by brownout reset or power on reset, RESETREAS register is reset in both cases.

    The mechanism we provide to avoid reset on high current consumption and low battery is simply to shut down the chip gracefully before the battery gets too weak. This can be obtained by monitoring the battery voltage with the internal ADC or by getting a low voltage warning from the Power-fail comparator, which has a configurable warning level from 2.1V to 2.7V. Shutting down the chip before reaching brown out reset will also prevent potential Flash corruption, which might occur if the chip is in the middle of flash write/erase operation when entering brown-out reset.

Reply
  • Hi Chris

    I think you are correct, you can not know internally in the chip if the reset was caused by brownout reset or power on reset, RESETREAS register is reset in both cases.

    The mechanism we provide to avoid reset on high current consumption and low battery is simply to shut down the chip gracefully before the battery gets too weak. This can be obtained by monitoring the battery voltage with the internal ADC or by getting a low voltage warning from the Power-fail comparator, which has a configurable warning level from 2.1V to 2.7V. Shutting down the chip before reaching brown out reset will also prevent potential Flash corruption, which might occur if the chip is in the middle of flash write/erase operation when entering brown-out reset.

Children
No Data
Related