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

nrf52 with LDO setup consum 10 uA

I set up my nrf52 self board with internal LDO using reference schematics  with internal LDO setup. 

Im entering the power safe mode using __WFE instruction

if(lpm_flag)
			{
				nrf_gpio_pin_clear(LED_0);
				retry_cnt = 0;
				
				nrf_esb_disable(); // останавливаем
				while(!nrf_esb_is_idle());
				NRF_RADIO->POWER = RADIO_POWER_POWER_Disabled << RADIO_POWER_POWER_Pos;
				
				// Уходим в спящий режим если ничего не приняли	
				clocks_set(XTAL_LF, true);
				clocks_set(XTAL_HF, false);
				
				// разрешаем прерывания от кнопки и геркона
				NVIC_EnableIRQ(GPIOTE_IRQn);
								
				//NRF_POWER->TASKS_LOWPWR = 1UL;
				
//				#ifdef NRF52
//				NRF_POWER->RAM[0].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[1].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[2].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[3].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[4].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[5].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[6].POWER = RAM_RETENTION_OFF;
//				NRF_POWER->RAM[7].POWER = RAM_RETENTION_OFF;
//				#endif //NRF52

//				NRF_POWER->SYSTEMOFF = 0x1;
//				(void) NRF_POWER->SYSTEMOFF;
//				while (true);
				// ждем события
				
				__WFE();
				__SEV();
				__WFE();
			}

Also i did the same with nrf51 but it has DC/DC converter mode. In nrf51 case current consumtion is 1.5 - 2 uA, in nrf52 case 10 - 14 uA. Is it influence of LDO ?

Parents Reply Children
  • My schematics

    Here is board schematics overhead.

    My GPIO  setting and clock setting functions:

    bool clocks_set(uint8_t source, bool state )
    {
    	NRF_CLOCK->CTIV = 16;
    	if(source == XTAL_HF)
    	{
    		if(state == true)
    		{
    				#if defined (NRF51822)
    						NRF_CLOCK->XTALFREQ = CLOCK_XTALFREQ_XTALFREQ_16MHz << CLOCK_XTALFREQ_XTALFREQ_Pos;
    				#endif
    				NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    				NRF_CLOCK->TASKS_HFCLKSTART = 1;
    				while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    		}
    		else if(state == false){
    			// если генератор запущен
    			NRF_CLOCK->TASKS_HFCLKSTOP = 1;
    			__NOP;
    		}
    		return (bool)(NRF_CLOCK->HFCLKSTAT >> CLOCK_HFCLKSTAT_STATE_Pos);
    	}
    	else if(source == XTAL_LF)
    	{
    		if(state == true)
    		{
    			// если генератор не запущен
    			NRF_CLOCK->LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos;
    			NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    			NRF_CLOCK->TASKS_LFCLKSTART = 1;
    			while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0);
    		}
    		else if(state == false){
    			NRF_CLOCK->TASKS_LFCLKSTOP = 1;
    			__NOP;
    		}
    		return (bool)(NRF_CLOCK->LFCLKSTAT >> CLOCK_LFCLKSTAT_STATE_Pos);
    	}
    }
    /*****************************************************************************************************/
    void gpio_init( void )
    {
    	uint32_t err_code;
    	//bsp_board_leds_init();
    	NVIC_DisableIRQ(GPIOTE_IRQn);	
    	NRF_GPIOTE->EVENTS_PORT = 0;
        #if defined (NRF51822)
    	#elif defined (NRF52832)
    		// Disable NFC pins
        NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
        NRF_UICR->NFCPINS = UICR_NFCPINS_PROTECT_Disabled << UICR_CUSTOMER_CUSTOMER_Pos;
        NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren<< NVMC_CONFIG_WEN_Pos;
    	#endif
    	// Светодиод - LED
    	nrf_gpio_cfg_output(LED_0); 
    	// Кнопка - Button
    	nrf_gpio_cfg_sense_input(BUTTON, GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos, NRF_GPIO_PIN_SENSE_LOW); 
    	// Геркон - Gerkon
    	nrf_gpio_cfg_sense_input(GERKON, GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos, NRF_GPIO_PIN_SENSE_LOW); 
    	NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Enabled << GPIOTE_INTENSET_PORT_Pos;   
    }
    There are no serious difference between nrf51822 and nrf52832 mcu code. But when i  use nrf51 current consuption is 1.5 - 2 ua against 10 uA with nrf52.

    Also i noticed that in a low power mode ( __WFE(); instruction) HF generator stay active and sourced by RC gain. I thought it will inactive when LF (32768 crystal) using in LPM.

    I cant use power off, becouse i need gpio (gerkon) interrupt on LOW and HIGH level both (switching between low and high).

    I measure current consumption with my measuring tool with 0.1 uA resolution in LPM mode only. In RX & TX  modes it  consumes 14 - 20 mA as it is in datasheet.

  • Dont you have any idea about my ansver below?

Related