Several places in the SDK (every version I've looked at) mention a function nrf_wait_for_app_event(), but it doesn't seem to actually exist in the SDK anywhere. Does it really exist, and is it more than simply { __WFE(); __SEV(); __WFE(); }?
Several places in the SDK (every version I've looked at) mention a function nrf_wait_for_app_event(), but it doesn't seem to actually exist in the SDK anywhere. Does it really exist, and is it more than simply { __WFE(); __SEV(); __WFE(); }?
It is sd_app_evt_wait() not nrf_wait_for_app_event()
It is little more than { __WFE(); __SEV(); __WFE(); }. The three instructions you mentioned above will wake the system up for any kind of chip event (sotdevice events and application events)
But sd_app_evt_wait will try to sleep until it is the application event (like app timers or app buttons etc) that is waking the system. That is, only application events will execute the next line of the call to function sd_app_evt_wait();
just enabling softdevice will not have any power consumption increase. The radio will be turned off for sure until your application starts advertising/scanning or a connection explicitly.
just enabling softdevice will not have any power consumption increase. The radio will be turned off for sure until your application starts advertising/scanning or a connection explicitly.