I have set the POFCON to enable the power failure comparator and set the voltage level to2.5 volts. How do I know when the battery voltage is below the 2.5 volt level? How do I register for the POFWARN event?
I have set the POFCON to enable the power failure comparator and set the voltage level to2.5 volts. How do I know when the battery voltage is below the 2.5 volt level? How do I register for the POFWARN event?
I believe you are supposed to get a POF warning event allowing you to prepare for power failure. If you are using the soft device stack I believe the stack will send you a NRF_EVT_POWER_FAILURE_WARNING if you enable the POF using sd_power_pof_enable.
Do I need to use the soft device stack to get this event?
No, it is part of the NVMC which you can access and deal with directly if you are not using the soft device. You will get the POFWARN event directly from the NVMC rather than the stack handling it and sending your a NRF_EVT_POWER_FAILURE_WARNING stack event.
Hi
There is a POF example on this thread. Also, there is a discussion on how to use it properly on this thread.