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

POFWARN

Hi,

I'm working on the nrf52832 development board and SDK 16.0. I want to use the Power supply supervisory functionality to detect any type of power failure.

I'm using ble Blinky example with softdevice s132 to test this.

I just want to know, How can I register my event with the soft device.

I have seen many examples regarding the POFWARN at this forum but unable to implement it in code. 

    err_code = sd_power_pof_enable(POWER_POFCON_POF_Enabled);
    APP_ERROR_CHECK(err_code);

    err_code = sd_power_pof_threshold_set(POWER_POFCON_THRESHOLD_V28);
    APP_ERROR_CHECK(err_code);

but I don't know where how to get the warning NRF_EVT_POWER_FAILURE_WARNING  by incorporating with the softdevice. If there is any example stating the procedure or any help will be grateful.

Thanks

Regards,

Parents Reply Children
  • Hi, 

    Muhammad said:

    This worked!

    Thanks for your kind feedback it really helped a lot.

    Happy to hear that can help. Please kindly verify the question to benefit other users. Thanks. 

    Muhammad said:
    I just wanted to know that if there is any register in NVM where any warning stores so that we can check whether there is any undesirable reset happened or not?

    You could check the NRF_POWER->RESETREAS register by the sd_power_reset_reason_get() in order to detect what caused your reset. This post and this might help you. 

    Muhammad said:
    As NRF_EVT_POWER_FAILURE_WARNING is the only event I know that is happening while on low power and reset. but how we will identify after reset that it was due to low voltage?

    This post and this might help you. 

    If you have further questions, please create a new support case. The new question now is far away from the original issue.

    -Amanda H. 

Related