Hello,
I wonder how power failure comparator works at VDD 2.1V. If VDD goes down to 2.1V, and I set POFCON enabled at 2.1V threshold, then does POFWARN work? How 2.1V threshold is produced by VBR?
Thanks..
Hello,
I wonder how power failure comparator works at VDD 2.1V. If VDD goes down to 2.1V, and I set POFCON enabled at 2.1V threshold, then does POFWARN work? How 2.1V threshold is produced by VBR?
Thanks..
Hi
If you enable the POF when equal or under the configured warning voltage, it should give you a warning when you enable it. Once the POF has given a warning event, the supply voltage will need to exceed V_POF+V_HYST in order to give warning again, see nRF51 Series Reference Manual 3.0, section 12.1.9
Tested with:
uint32_t p_event;
err_code = sd_evt_get(&p_event); // get any pending events generated by the SoC API
if (err_code == NRF_SUCCESS)
{
if (p_event == NRF_EVT_POWER_FAILURE_WARNING) // SD event
{
sd_nvic_ClearPendingIRQ(SD_EVT_IRQn); // clear NRF_POWER->EVENTS_POFWARN after MOTOR test (to clear preceding warnings)
}
}
Works as expected.
POFWARN event for Power failure warning will be triggered on any voltage below 2.1V is detected after POFCON enabled. You can also disable softdevice and check for this warning once POFCON is enable and threshold is set. if (NRF_POWER->EVENTS_POFWARN) condition can be helpful to check for this event. Clearing this event / interrupt might help to see this triggered again from voltage going lower then threshold in next power cycle if any.