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

High power consumption when starting external LFCLK

Just starting the external LFCLK needs a considerable amount of energy. With my evaluation board it takes about 340ms for the XTAL to get started, which is well within the specifications. However, during all this time, the system draws about 820µA at least. I guess this current is not needed for the XTAL itself but for the system to permanently check whether the frequency is stable enough already. It would be much more efficient if this check was done just once in a while, but the user does not have enough control over the clock management in order to change the implementation in this direction.
Is there any way to avoid this high power consumption?

Here is a small demo program which allows to switch the external LFCLK on with BUTTON_0 and off with BUTTON_1. When interpreting the current measurements, keep in mind that the buttons draw some current via the pullups while being pressed (~200µA).

#include "nrf_gpio.h"
#include "boards.h"

int main(void)
{
	NRF_POWER->RESET = POWER_RESET_RESET_Msk;	
	nrf_gpio_cfg_sense_input(BUTTON_0, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);			
	nrf_gpio_cfg_sense_input(BUTTON_1, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);			
	SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
	NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Msk;
	for (int clkEnab=0;;)
	{
		__wfe();
		NRF_GPIOTE->EVENTS_PORT = 0;
		NVIC_ClearPendingIRQ(GPIOTE_IRQn);
		if (!clkEnab && nrf_gpio_pin_read(BUTTON_0)==0)
		{
			NRF_CLOCK->LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal<<CLOCK_LFCLKSRC_SRC_Pos;
			NRF_CLOCK->TASKS_LFCLKSTART  = 1;
			clkEnab = 1;
		}
		else if (clkEnab && nrf_gpio_pin_read(BUTTON_1)==0)
		{
			NRF_CLOCK->TASKS_LFCLKSTOP  = 1;
			clkEnab = 0;
		}
	}
} ////
  • Hi

    I think there is nothing that can be configured to avoid this current consumption. It is automatically handled internally and can not be configured. Usually, you only draw this current once for each reset, so it should usually not be of that big concern.

    Update 27.1.2014 There is also the possibility of using the internal LFCLK RC with the

    NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION
    

    option , which will add 2-3 uA compared to a 20ppm crystal. I guess it depends on how frequently you need to start the crystal if it would pay off to use the RC instead, see this thread

  • Thanks for the response. Whether it is a problem clearly depends on the application. In my application the system is in the SYSTEM ON mode for a relatively short period of time (some minutes) and all it does is reporting infrequent button press events. It is long enough to make it worthwhile starting the external LFCLK but short enough to make the power consumption for starting the clock a considerable factor. This somewhat unexpectedly high power consumption won't render the nRF51 completely unusable for my application and won't matter too much for many other applications, I guess, but maybe it could be reduced in future releases of the chip. I also think that it should be mentioned in the Reference Guide or Product Specification. Anyway, thanks for confirming that this cannot be avoided, so I just have to live with it.

  • Stefan, in response to your update of 27.1.2015 regarding the use of the RC: Thank you for the suggestion which is definitely an alternative worth being further investigated. Going from 20ppm to 250ppm will increase radio up time though, but it might still pay off in my application.

Related