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

Prevent sd_app_evt_wait from wakeup

hello,

I'm currently stuck with sd_app_evt_wait() function leaving for an unknown reason. This function is called in the main loop.

The only reasons that shall exit the low power mode are:

- RTC1 (app_timer) callback trigger, it is triggered every 100ms

- one of 10 GPIOs state change (buttons)

Could you please help me find the reason why the execution does not stay in sd_app_evt_wait wakeup() and eventually guide me to a solution?  If you need more details, please aks, I don't know what you would need.

Note:

- This function leaves with error code 0 and NVIC_GetPendingIRQ() also returns 0 just after this function

- my board does not have any external XTAL, instead I use LF_RC clock and I manually start LFCLK before initializing the softdevice. I do not manually start HFCLK, does the softdevice initialization does it automatically?

- if I do not initialize the softdevice and call  __WFI();__WFE();__SEV();__WFE(); I stay in low power mode. The simple fact to call SOFTDEVICE_HANDLER_INIT() introduces my problem.

- I don't know how to debug to find out the reason

- because of this problem, the board power consumption is 7,5mA instead of few µA which is a current NO GO for production.

- Does it have to do with a disabled interrupt? How could I know which disabled interrupt occurs?

Thanks in advance for your help.

Related