9 years, 3 months ago.

nRF51822 SYSTEMOFF power consumption (not high because of SWD debug)

I know power consumption can be higher than expected in SYSTEMOFF due to debug, but this isn't the issue here.

The presence of a Serial (UART) seems to have made a huge difference to the SYSTEMOFF power consumption.

This gives me 10-15uA in my custom circuit, of which less than 5uA will be the nRF51822:

#include "mbed.h"

int main() {
        wait(10.0);
        NRF_POWER->SYSTEMOFF = 1;
        __WFI();
        // JUST IN CASE
        NVIC_SystemReset();
}

.

This however is around 500uA:

#include "mbed.h"

#define CONSOLE_TX_PIN                  P0_6
#define CONSOLE_RX_PIN                  P0_5
#define CONSOLE_BAUD_RATE               9600//115200//19200//115200

Serial pc(CONSOLE_TX_PIN, CONSOLE_RX_PIN);

int main() {
        pc.baud(CONSOLE_BAUD_RATE);
        wait(1.0);
        pc.printf("About to SYSTEMOFF\r\n");
   //------------ This code doesn't seem to make any difference - start --------//     
        NRF_UART0->TASKS_STOPTX = 1;
        NRF_UART0->TASKS_STOPRX = 1;
        NRF_UART0->ENABLE = 0;
        NRF_UART0->POWER = 0;
   //------------ This code doesn't seem to make any difference - end --------//     
        wait(10.0);
        NRF_POWER->SYSTEMOFF = 1;
        __WFI();
        // JUST IN CASE
        NVIC_SystemReset();
}

.

Any ideas why there is such a difference. I thought SYSTEMOFF was supposed to stop all the relevant clocks etc. Is it related to having GPIO configured by the Serial?

Hello,

can you disable those pullups enabled for those pins how low we can get then?

posted by Martin Kojtal 13 Aug 2015

Hi Martin, I added code to do that (below) and it didn't change the figures I see: NRF_GPIO->DIRCLR = (1 << 5) | (1 << 6) | (1 << 8) | (1 << 10); NRF_GPIO->PIN_CNF[5] = 0x00000002; NRF_GPIO->PIN_CNF[6] = 0x00000002; NRF_GPIO->PIN_CNF[8] = 0x00000002; NRF_GPIO->PIN_CNF[10] = 0x00000002;

posted by Chris P 13 Aug 2015

I think what is happening is that it is falling through the NRF_POWER->SYSTEMOFF=1 and then running WFI(); If I remove the WFI() it straight away resets. SHouldn't NRF_POWER->SYSTEMOFF=1 send it straight to system off mode??

posted by Chris P 13 Aug 2015
Be the first to answer this question.