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

518822 can't go into sleep mod for current saving

Hi !

     In order to consume lowest current,we use the function power_manage() ,let the MCU go into sleep,the SD is S130, V1.0,we enable the GPIOTE,watchdog ,ADC ,app_timer,and UART0.Before going into sleep ,we stop(disable)the UART0.We find that sometimes  MCU can go into sleep,but sometimes not. I'm sure that unused IOs are not in float statue. Current sample resister is 5 Ω, the voltage between it is 5~8mV,it meas that current is 1mA.When we debug the program ,find  the internal 16MHz RC osillator is alway running. I *** the power_manage()  does'nt tack affect. How to solutethe problem,our production cann't work in low power mod, it is terrible.There maybe a bug in this chip.

.current HIghNormal 16MHz RC always runningClock diagram

  • I test the IC in the smallest system,all GPIO disconnnect.

    (1)confige all GPIO pulldown input

    nrf_gpio_range_cfg_input(0,31,NRF_GPIO_PIN_PULLUP)
    ,run t advertising at he S130 . the chip can't work;

    (2)Let the GPIO at reset statue,run  advertising at he S130 . the chip can work; current consumption is float ,change from 0.4~1mA.

    (3)Confige GPIO as ouput one by one,the chip can work; current consumption is about 1mA, run advertising well;

    (4)Confige GPIO as ouput one by one, in the main funtion just do "power_manage();" current consumption is 1mA .There is a plus every 250ms,I don't know what happen in the chip.

    The test code as follow:

    int main(void)   
    {
    	volatile static uint32_t err_code;
    	bool                     erase_bonds=true;	
    	uint8_t                  i;
    
    	for(i=0;i<32;i++)//can work
    	{
    		nrf_gpio_cfg_output(i);	  //make sure the pin isn't float
    	}	
    	/*	 
    	timers_init();		
       ble_stack_init();
       err_code = pstorage_init();
       APP_ERROR_CHECK(err_code);
    	 
    
     
       device_manager_init(erase_bonds);
       db_discovery_init();
       csc_c_init(); 
    
       Init_user_info_store();
       load_gps_correct(&m_sys_data_store);	
    	 
       ph_device_manager_init(false);	
       gap_params_init();	 
       advertising_init();
       services_init();
       hids_init();
       ancs_service_init();
       conn_params_init();
    
       Init_CentralDevice_Scan();
    
       Init_App_Comit();
    //   ADC_Config();  //unused  	 
    //   nrf_gpio_range_cfg_input(0,31,NRF_GPIO_PIN_PULLUP);//add this function,CPU can't work
    
       advertising_start();
    */
    
       
    	
       for (;;) 
       {
    
          power_manage();
    
    		 
    	 }
    
    }

    So, frome the test ,the chip maybe have a big bug ,it isn't goog for using at low power production .Or my operation maybe exist a mistake.Could Nordic engineers give a good solution? I'm waiting...

  • Hi

    When the current increases due to an uninit, it indicates that something with the uninit went wrong and that you get an error/hardfault causing the CPU to keep running continuously. So you'll have to find out what's wrong with your uninit function to fix this 4mA consumption.

    Next, a 1.3 mA current draw indicates that the chip is in debug mode when you measured the current initially. You can check out section 11.1.3 "Resuming Normal Mode" in the nRF51 reference manual.

    According to the compatibility matrix, the nRF51 revision 3 supports all versions of the S130 SoftDevice.

    Best regards,

    Simon

  • Hi

      Simon,I measured the current isn't in debug mode ,no breakpoint in the program,all debug tool and IC  PIN were disconnect.Runs the smallest IC system and simplest code ,the 1mA current draw is still existing.Enable and disable the SD ,the problem can't  be soluted.

  • There's an issue with the nRF51 series where the power reset might not work to get you out of debug mode. You can try connecting an external resistor to the SWDCLK pin. We have tested with a 470Ohm external resistor which should help here.

    You can also check out this current consumption guide for a multitude of ways to reduce current consumption for the nRF51 series. Give them a try and report back if you still can't fix it.

    Best regards,

    Simon

Related