Could anyone confirm POF warning working stable on s132_nrf52_2.0.0_softdevice ?
Could anyone confirm POF warning working stable on s132_nrf52_2.0.0_softdevice ?
I believe you are working on nRF5 SDK v11, in that case you may find this page useful in general:
https://devzone.nordicsemi.com/f/nordic-q-a/12495/what-are-sdk-11-0-0-known-issues
There are some issue with POF and the S132v2.0.0, you should download and program S132v2.0.1:
https://www.nordicsemi.com/Software-and-tools/Software/S132/Download#infotabs
Hi, I am successfully flash S132v2.0.1 and could confirm NRF_EVT_POWER_FAILURE_WARNING is generated well
err_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
APP_ERROR_CHECK(err_code);
err_code = sd_power_pof_enable(1);
APP_ERROR_CHECK(err_code);
err_code = sd_power_pof_threshold_set(NRF_POWER_THRESHOLD_V27);
APP_ERROR_CHECK(err_code);
But I have the next problem after few warnings I got next one sequence:
pstorage LOAD callback received
sys_evt 2
pstorage UPDATE ERROR callback received
sys_evt = 3 (NRF_EVT_FLASH_OPERATION_ERROR)
and all my flash content go corrupt with random values, what you can suggest, how to debug this case ?
I think problem with properly dispatch, my is next
static void sys_evt_dispatch(uint32_t sys_evt)
{
pstorage_sys_event_handler(sys_evt);
ble_advertising_on_sys_evt(sys_evt);
if (sys_evt == NRF_EVT_POWER_FAILURE_WARNING)
{
UI_DEBUG_LOG("NRF_EVT_POWER_FAILURE_WARNING\r\n");
}
}
I don't recommend enabling POF if you are doing any flash erase or write operation:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#unique_648169564
"If power-fail warning is enabled and the supply voltage is below VPOF the power-fail comparator will prevent the NVMC from performing write operations to the NVM."
This in essence means that the flash erase and write operations will simply be skipped by hardware, this is not something software will handle typically.
Best regards,
Kenneth
originally problem is next: I have periodic flash operations (write etc.) and when during this operation I simulate power drop below 1.8 V and more I have corruption of flash content. To prevent this i guess POF could help to skip flash operation on unstable power but not sure yet