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

nRF52 LFCLK ~40 uA consumption with SRC=Xtal

Hello,

I'm seeing higher than expected power consumption when running an RTC peripheral using LFXO as the LFCLK source compared to using the internal RC. Specifically, I'm observing a constant ~40 uA current consumption using the external 32 kHz Xtal as the LFCLK source, compared to ~3.3 uA using the internal 32 kHz RC as the clock source. I was expecting to see only 2-3 uA current consumption using an external 32 kHz LFCLK source.

My hardware setup is a nRF52840 Preview Development Kit, measuring the current consumption with the Power Profiler Kit.

My software is enabling the following peripherals only:

  • LFCLK (SRC=Xtal or Rc, BYPASS=0, EXTERNAL=0)
  • RTC0 (running at 32 kHz tick rate)

RTC0 is only configured to generate OVRFLW and COMPARE0 interrupts, and COMPARE0 is used to wake up the CPU every 1 second, and then the CPU goes back to sleep with WFI. The average current measurements I stated above were captured while the CPU is asleep, but RTC0 is running using LFCLK.

I am not using any SDK, as I am not using C/C++.

The *only* thing I am changing is the SRC for LFCLK to either Rc or Xtal. I am not explicitly enabling any other peripherals or the HFXO, so I don't understand the large difference in power consumption between the two LFCLK sources.

What could be causing such a high current consumption using the external Xtal compared to the internal Rc oscillator?

edit: corrected hardware setup (I have a Preview DK, not one of the newer DK).

Parents
  • Did you add any checks to determine that the LF crystal is actually starting up? It needs to start up before you can enable the RTC. Something like this:

    NRF_CLOCK->TASKS_LFCLKSTART = 1;
    while(NRF_CLOCK->EVENTS_LFCLKSTARTED == 0){}
    NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;

    If this is not working, can you please post the hex file here, both the LFXO and the LFRC one. Then I can try to measure here on a preview DK.

  • Hi Stian,

    Thanks for the reply and suggestion.

    I am already checking the that the LFCLK is starting before using the RTC with the same code you posted (start the LFCLK, wait for it to start, then clear the event). I have also confirmed that the LFCLK is starting correctly and with the correct source by inspecting the CLOCK registers via a debugger once the code has started.

    I've attached the two hex files using the LFRC or LFXO clock source. I built these by only changing the line of code which sets the LFCLKSRC register. The attached programs should both blink LED2 with a period of 500 ms on, 500 ms off.

    blinky_lfrc.hexblinky_lfxo.hex

Reply
  • Hi Stian,

    Thanks for the reply and suggestion.

    I am already checking the that the LFCLK is starting before using the RTC with the same code you posted (start the LFCLK, wait for it to start, then clear the event). I have also confirmed that the LFCLK is starting correctly and with the correct source by inspecting the CLOCK registers via a debugger once the code has started.

    I've attached the two hex files using the LFRC or LFXO clock source. I built these by only changing the line of code which sets the LFCLKSRC register. The attached programs should both blink LED2 with a period of 500 ms on, 500 ms off.

    blinky_lfrc.hexblinky_lfxo.hex

Children
Related