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

Can't break 1 mA power consumption on 51822

Hi,

I'm resetting the chip externally using the reset pin to not be in debug mode. I'm running the system off example here modified to not use buttons.

I have the J-Link disconnected from the board while measuring power. Is there something else I need to do to to shutdown? Also note that calling sd_power_system_off() draws about 4 mA at its current location. Does the soft device require some sort of configuration before disabling?

Also should note that I am initializing all of the GPIO pins using nrf_gpio_cfg_output, nrf_gpio_cfg_input, nrf_gpio_pin_set, and nrf_gpio_pin_clear, but not shown in the code snippet below.

Thanks in advance for your help.

    int main(void)
    {
        uint32_t err_code;
    
        NRF_POWER->TASKS_LOWPWR = 1;
        NRF_POWER->RESET = 1;
    
        // If desired, change the RAM retention parameters:
        NRF_POWER->RAMON = POWER_RAMON_ONRAM0_RAM0On   << POWER_RAMON_ONRAM0_Pos
                         | POWER_RAMON_ONRAM1_RAM1On   << POWER_RAMON_ONRAM1_Pos
                         | POWER_RAMON_OFFRAM0_RAM0Off << POWER_RAMON_OFFRAM0_Pos
                         | POWER_RAMON_OFFRAM1_RAM1Off << POWER_RAMON_OFFRAM1_Pos;
    
/* These calls don't make a difference
        NRF_ADC->ENABLE = 0;
        NRF_UART0->ENABLE = 0;
        NRF_SPI0->ENABLE = 0;
        NRF_TWI0->ENABLE = 0;
        NRF_SPI1->ENABLE = 0;
        NRF_TWI1->ENABLE = 0;
        NRF_SPIS1->ENABLE = 0;
        NRF_SPIM1->ENABLE = 0;
        NRF_AAR->ENABLE = 0;
        NRF_CCM->ENABLE = 0;
        NRF_WDT->CONFIG = 0;
        NRF_QDEC->ENABLE = 0;
        NRF_LPCOMP->ENABLE = 0;
    
        NRF_TEMP->TASKS_STOP = 1;
        NRF_RTC0->TASKS_STOP = 1;
        NRF_RTC1->TASKS_STOP = 1;
        NRF_TIMER0->TASKS_SHUTDOWN = 1;
        NRF_TIMER1->TASKS_SHUTDOWN = 1;
        NRF_TIMER2->TASKS_SHUTDOWN = 1;
        NRF_RNG->TASKS_STOP = 1;
        NRF_ECB->TASKS_STOPECB = 1;
    
        NRF_GPIOTE->INTENCLR = 1;
        NRF_RADIO->TASKS_DISABLE = 1;
        NRF_CLOCK->TASKS_HFCLKSTOP = 1;
*/
    
        while(1)
        {
                // Enter system OFF. After wakeup the chip will be reset, and the MCU will run from the top
            NRF_POWER->SYSTEMOFF = 1;
            //sd_power_system_off();
        }
    }
Parents
  • Hi, just in case, are you using a custom board or one of the DK / EKs made by Nordic?

    I had a similar question like this.

    Referring the answer from that,

    When you flash the nRF51, it should be in debug mode and consume ~1mA additional current. 
    When you power-reset, you should see a ~1mA drop.
    If you do not see this drop, then you either are still in debug mode,
    or your application is having some peripheral enabled that 
    keeps the 16MHz clock source enabled.
    
    Unfortunately, there is no direct indication of still being in debug mode, 
    other than the current consumption is excessive.
    Some customers had problems on custom boards because of disturbance on SWCLK,
    which triggers debug mode,
    

    So can you check SWCLK pin of your board?

Reply
  • Hi, just in case, are you using a custom board or one of the DK / EKs made by Nordic?

    I had a similar question like this.

    Referring the answer from that,

    When you flash the nRF51, it should be in debug mode and consume ~1mA additional current. 
    When you power-reset, you should see a ~1mA drop.
    If you do not see this drop, then you either are still in debug mode,
    or your application is having some peripheral enabled that 
    keeps the 16MHz clock source enabled.
    
    Unfortunately, there is no direct indication of still being in debug mode, 
    other than the current consumption is excessive.
    Some customers had problems on custom boards because of disturbance on SWCLK,
    which triggers debug mode,
    

    So can you check SWCLK pin of your board?

Children
No Data
Related