In working through understanding how sleep works with the SDK I ran into the following note for sd_app_evt_wait()
The application must ensure that the pended flag is cleared using sd_nvic_ClearPendingIRQ in order to sleep using this function. This is only necessary for disabled interrupts, as the interrupt handler will clear the pending flag automatically for enabled interrupts.
I am using nrf_pwr_mgmt_run() when the application is idle to put the system to sleep, which calls sd_app_evt_wait(). This looks fine except the above note leads me to think I need to add sd_nvic_ClearPendingIRQ() calls for all unused/disabled interrupts.
Some evidence of this is in nrf_pwr_mgmt_run() where the PWR_MGMT_FPU_SLEEP_PREPARE macro is used just before calling sd_app_evt_wait() to clear pending interrupts to avoid preventing the system from sleeping as the following comment notes:
* Clear FPU exceptions.
* Without this step, the FPU interrupt is marked as pending,
* preventing system from sleeping.
Do I need to add calls to sd_nvic_ClearPendingIRQ or does nrf_pwr_mgmt_run handle this in some way that I don't see?