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 Reply Children
No Data
Related