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

PowerFail IRQ

How can I use power fail IRQ for wakeup ? How can I set polarity for wake up pin ? Which method is better for wakeup, pin, comparator or RTC2 ? application is just two digital inputs and power fail detection.

  • Hi,

    Note that the power-fail comparator is not on in System OFF and System ON when HFCLK is not running. Enable and configure the power fail comparator using the POFCON register, next you need to enable the POFWARN event using the INTENSET register. IRQ will automatically trigger wakeup, next you need to handle the interrupt. This information can be found in the section on POWER for the nRF52 on infocenter.

    Which method to use for wakeup depends on your application. If you need to periodically wakeup you can use RTC2, you can wakeup at will by using a pin or wakeup due to some interrupt. You can also do all of the above, if you wish.

    Best regards,

    Øyvind

Related