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

nRF52840 UARTE+GPIOTE current consumption as compared to nRF52832

I am measuring current on the nRF52840 when UARTE + GPIOTE are running (and sd_app_evt_wait() is called in the meantime), and I see about 1.2mA average current. On the nRF52832, the same app (it is just rebuilt for nRF52840) draws around 700uA, which is a significant change.

Is this difference expected? Is it due to the GPIOTE errata (extra 400uA)? If it is due to the GPIOTE errata, is there any way to bypass it while UARTE is active? I see 0.8mA mentioned in other posts regarding UARTE on the 840, but I'm not sure where that number actually comes from with regards to the datasheet. 

Any guidance would be appreciated. Thanks!

  • Hi,

    It is difficult to say without knowing more about your app and HW, which peripherals etc. are active. Generally you should only get about 2-3 μA in low power mode (calling sd_app_evt_wait()) provided you are not using any additional resources at that time.

  • Hi Einar, as stated in my post, I am using the UART peripheral. Below is a sample main function that I am using. Here, with UART I am getting about 0.8mA. Is this expected? With UARTE I see about 1.2mA. Is there any way to bring this current down? 

    I am testing on the nRF52840 DK, and using a 50kHz Keysight DMM to measure (so I'm sure it's accurate enough for this purpose).

    int main()
    {
       {NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Disabled << UART_ENABLE_ENABLE_Pos; \
                            *(volatile uint32_t *)0x40002FFC = 0; \
                            *(volatile uint32_t *)0x40002FFC; \
                            *(volatile uint32_t *)0x40002FFC = 1;}
        
       NRF_P0->DIRSET = 0xFFFFFFFC;
       NRF_P0->OUTCLR = 0xFFFFFFFC;
       NRF_P1->DIRSET = 0xFFFFFFFF;
       NRF_P1->OUTCLR = 0xFFFFFFFF;
      
       NRF_CLOCK->TASKS_HFCLKSTART = 1;
       while(NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
       {
       
       }
       NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
       NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos;
       
       
       NRF_UART0->TASKS_STARTRX = 1;
        
       NRF_POWER->DCDCEN = POWER_DCDCEN_DCDCEN_Disabled << POWER_DCDCEN_DCDCEN_Pos;
       NRF_POWER->DCDCEN0 = POWER_DCDCEN0_DCDCEN_Disabled << POWER_DCDCEN0_DCDCEN_Pos;
       
       for (uint32_t i = 0; i < 5000000; i++)
       {
          __NOP();
       }
       
       while(1)
       {
          __WFE();
          //__SEV();
          //__WFE();
       }
    }
    

  • Hi,

    I am sorry, I read your initial question too quickly, so I did not noise that you intended to test with the UART active. These numbers make sense. The UARTE peripheral has a higher current consumption than the UART peripheral, due to the added current consumption of the DMA bus. (This is the same for all peripherals where you have DMA and non-DMA alternatives, due to the DMA logic.)

    There is no way to bring down this current consumption specifically, other than making sure that you enable the DC/DC. You should also make sure that you only enable peripherals when they are needed, and disable them immediately after, so that you reduce the average current consumption.

Related