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

When should you use the nrf_pwr_mgmt module?

I'm reading the SDK15.2 documentation coming from SDK 11.  I've noticed the nrf_pwr_mgmt module, but I haven't seen it utilized by any of the examples.  When should this module be used?  It seems like its not required for Power Optimization, so I'm a bit baffled at to its purpose.  

Cheers,

Parents
  • Hi Jeff.

    The nrf_pwr_mgmt module is utilized by most examples with the call nrf_pwr_mgmt_run();
    In the main-loop in most examples the function idle_state_handle(); is called, and inside this function the nrf_pwr_mgmt_run(); function is called.
    It's used to make the CPU enter sleep mode and remain in sleep mode until an event occurs. This is done by a _WFE() instruction either in nrf_pwr_mgmt_run() or in sd_app_evt_wait().


    - Andreas

  • I didn't see this in the example I was looking at. What about in the freeRTOS examples, i didn't see any called to nrf_pwr_mgmt in these examples, nor in the nrf_sdh_freertos.c?  Do these needs calls for nrf_pwr_mgmt is power optimize? 

    Also curious about why nrf_pwr_mgmt was created in addition to sd_app_evt_wait().  Its just a little confusing.

    Thanks,

    JB

Reply Children
Related