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

nrf52 UARTE/Fifo high current consumption

I am struggling with excess current consupmtion using uart+fifo. It seems like ~300uA is drawn by UART and disabling via app_uart_close() doesn't help.

I have checked all possible configurations of below params:

#define UART0_CONFIG_USE_EASY_DMA false
//Compile time flag
#define UART_EASY_DMA_SUPPORT     1
#define UART_LEGACY_SUPPORT       1
#endif //NRF52

and after uart_close() current jumps to 2mA and stays there for a while and goes back to the same value of ~300uA; I am pretty sure its UART - I can comment it out and current stasy at very low levels.

I have tried different settings and UARTE/UART mixing but it only makes it worse if I ie. use only easy_dma. Any suggestions ? Errata?

I use SDK12, with SD132, sd is enabled, but no advertsing.

  • OskarM,

    We found the same issue using the UART with S132 V2.0.0 and SDK11. What you are forgetting is the UART requests the 16MHz clock which if you look into the electrical specs you will see the supply current for the Ihfxo is ~250uA combined with the UART accounts for your ~300uA.

  • So should I care for switching the clock off when I am using SD+scheduler? How to do that?

    Solution for my issue was putting "uart_close()" in a timer cb function (even 10ms does the job), so I thought of either some race conditions or that I should use scheduler somewhere in the UART transactions, especially just before switching it of, to enable proper event distribution within the app. I am not very familiar with the SD internals...

  • Hi Oskar

    I do not experience the same as you on nRF52. If I try out the standard ble_app_uart example in SDK 12.0.0 and I add app_uart_close() a at the end of the initialization in main but before the main loop then I get low current consumption. If I also dont start advertising I get ~2uA current consumption:

    ...
    advertising_init();
    conn_params_init();
    
    //    printf("\r\nUART Start!\r\n");
    //    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    //    APP_ERROR_CHECK(err_code);
    
    	app_uart_close();
    
    // Enter main loop.
    for (;;)
    {
        power_manage();
    }
    

    This result seems to be consistent both if I choose to use EasyDMA or not, i.e. regardless if I choose

    #define UART0_CONFIG_USE_EASY_DMA 1
    

    in sdk_config.h or if I choose

    #define UART0_CONFIG_USE_EASY_DMA 0
    
  • Hi OskarM,

    That's totally late but may help other people. I had the same issue on nrf52840, with 400uA over consumption, and found following workaround.

    I think the issue is linked between GPIOTE and UARTE, and app_uart_close() that is not properly switching off HFCLK. It looks like you can switch off UARTE peripheral at address 0x40002000 (UARTE) + 0xFFC (POWER) (this is not documented). So using following code you can switch off / on UARTE peripheral, and find back original consumption:

    *(volatile uint32_t *)0x40002FFC = 0;
    *(volatile uint32_t *)0x40002FFC;
    *(volatile uint32_t *)0x40002FFC = 1;

    Can someone from Nordic confirm / explain this issue ? Thanks !

Related