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

Power consumption when changing HFCLK

When I changed HFCLK from "64 MHz internal oscillator (HFINT)" to "64 MHz crystal oscillator (HFXO)", the power consumption when executing sd_app_evt_wait() became larger.
I would like to reduce the power consumption to the same level as "64 MHz internal oscillator (HFINT)". Is there any way to deal with this?

"64 MHz internal oscillator (HFINT)":2.3uA
"64 MHz crystal oscillator (HFXO)"  :396uA


■Environment
  nRF52810
  s112

■situation
The following code was added at startup to change HFCLK.

    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK->TASKS_HFCLKSTART = 1;

    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);

Currently, when executing sd_app_evt_wait(), I just call the function without any control.
When HFCLK is changed, do we need to do any control?
For example, is it necessary to take the following actions before and after executing sd_app_evt_wait function?

    NRF_CLOCK->TASKS_HFCLKSTOP = 1;                 //add

    err = sd_app_evt_wait();
    APP_ERROR_CHECK( err );

    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;             //add
    NRF_CLOCK->TASKS_HFCLKSTART = 1;                //add


    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);    //add

Related