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

Parents Reply
  • If you need an accurate HFCLK while the chip is running CPU, then you need to request and release the HFCLK while awake. However since the chip will wakeup frequent, and the time to startup the external HFCLK require 1.5ms, this will have a higher power consumption hit on average. My impression is that the majority of applications out there dont' do this (the don't start the external HFCLK), is there are particular reason why you need the external HFCLK while executing code?

    Kenneth

Children
No Data
Related