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.
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.
Whether or not nrf_pwr_mgmt or sd_app_evt_wait(); is used depends on how effective each method is. You don't need nrf_pwr_mgmt for the FreeRTOS examples.
In the FreeRTOS examples _WFE(); is used, because sd_app_error_wait(); increases power consumption with freeRTOS compared to _WFE();