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

Why does my nRF51822 consume > 1 mA in sleep?

No matter what sleep mode I put my nRF51822 in (system on, idle, system-off), it seems that the base current is above 1 mA. Is this how it's supposed to be?

  • I am currently using GPIOTE pin to wake up system from deep sleep mode. According to PS table 33 GPIOTE requires both 1.2V regulator and HFCLK. Look back to table 32. Which requires 520uA. But I actually measured my power consumption is about 100uA. I am sure HFCLK is not working when system is off. Is there any possibility I can make the power consumption any lower with GPIOTE wakeup feature on? Or how it suppose to be with 4 GPIOTE wakeups during deep sleep?

  • This issue almost made me mad but eventually the culprit was indeed the debug mode. I disconnected the debug cable and started the system with external power source but there was a large capacitor on nRF51822's power line that was able to power the chip until the external power arrived. Thus the system remained in debug mode after programming even though I thought that I switched it off after flashing.

  • Can I achieve the results of "nrfjprog -p" commands by code itself?
    I have written following lines in my code, will it result same as "nrfjprog -p"

    void main()
    {
    if( ( NRF_UICR->APPROTECT & 0xFF ) == 0xFF )
    {
    // enable UICR register write mode
    NRF_NVMC->CONFIG = ( NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos );
    while( NRF_NVMC->READY == NVMC_READY_READY_Busy );

    // disable debug mode
    NRF_UICR->APPROTECT = 0;

    // disable UICR register write mode
    NRF_NVMC->CONFIG = ( NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos );
    while( NRF_NVMC->READY == NVMC_READY_READY_Busy );

    // reboot is required to apply changes
    NVIC_SystemReset();
    }

    // continue application
    }

     

Related