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

nrf_wait_for_app_event

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(); }?

Parents
  • 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();

Reply
  • 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();

Children
Related