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

UART current consumption

Hello,

I developed an application for a custom nrf52832 board. It uses the Nordic UART Service (NUS) to transmit data over BLE. This works fine.

At the moment I am trying to optimize the current consumtion of this application on the custom nrf52832 board. I have already made some measurements and I figured out the following:

If I initialize the UART by calling the uart_init() function, my current consumption increases by 1,35mA (V_cc = 1.8V). This looks a bit too high for me.

Can you please answer my following questions:

1. Is this the normal current consumption of the UART?

2. Are there any ways to lower the current consumption of the UART?

Thank you very much in advance.

  • I'm not able to reproduce this behavior. I'm still seeing low current consumption after connection as long as the RX pin is set to disconnected.

    You say "when my device is connected to the central and data is sent over NUS", can you describe exactly at what point the current increases? What steps did you do after establishing the connection to the device?

  • Hello,

    thank you very much for your reply.

    Sorry for my inaccurate description in my previous reply to you.

    I start with initializing log, timers, buttons_leds and power_managment:

            log_init();
            timers_init();
            buttons_leds_init(&erase_bonds);
            power_management_init();

    Current consumption: 0.391mA

    If I initialize uart after that with RX_PIN_NUMBER, my current increases to 1.768mA. (Case 1)

    If I initialize uart after that with UART_PIN_DISCONNECTED, my current increases to 0.392mA (Case 2)

    ----------------------------------------

    Case 1:

    After Initialize ble_stack, gap_param, gatt, services, advertising, conn_param:

        ble_stack_init();
        gap_params_init();
        gatt_init();
        services_init();
        advertising_init();
        conn_params_init();

    Current while advertising: 2.03mA

    Current while connected (no data transfer): 1.85mA

    After intializing SAADC and start using NUS:

              saadc_sampling_event_init();
              saadc_init();
              saadc_sampling_event_enable(){
                    ...
                    nrf_drv_clock_hfclk_request(NULL); 
                    ...
              };

    Current: 2.84mA

    -----------------------------------------

    Case 2:

    After Initialize ble_stack, gap_param, gatt, services, advertising, conn_param:

        ble_stack_init();
        gap_params_init();
        gatt_init();
        services_init();
        advertising_init();
        conn_params_init();

    Current while advertising: 0.377mA

    Current while connected (no data transfer): 0.144mA

    After intializing SAADC and start using NUS:

              saadc_sampling_event_init();
              saadc_init();
              saadc_sampling_event_enable(){
                    ...
                    nrf_drv_clock_hfclk_request(NULL); 
                    ...
              };

    Current: 2.81mA

    ----------------------------------------

    Do you know why my overall current consumption is finally the same?

  • The SAADC also enables the EasyDMA once started. You can try enabling low-power mode in your sdk_config.h file:

    // <q> SAADC_CONFIG_LP_MODE  - Enabling low power mode
     
    
    #ifndef SAADC_CONFIG_LP_MODE
    #define SAADC_CONFIG_LP_MODE 1
    #endif

    Note that requesting the HFCLK will cause ~400 uA current @ 3.0 V increase in current as well.

  • Hello, thank you very much for your answer.

    enabling low-power mode

    I applied your suggested change in the sdk_config, but unfortunaly it does not change anything.

    Note that requesting the HFCLK will cause ~400 uA

    I know that, but I have to use the HFCLK for the accuracy of the SAADC.

    I figured out, that when I use NUS without the SAADC, the current consumption with UART_PIN_DISCONNECTED is significantly lower than with RX_PIN_NUMBER. So it looks like it have something to do with the SAADC.

    Do you have any suggestions?

    Thank you very much in advance.

  • Do you have multiple channels enabled in the SAADC? I have seen before that this could prevent the low power mode from working correctly. Also, what sample rate are you using for the SAADC?

    This Github repository has a few examples of low power SAADC with one and multiple channels.

    This post has an example for multichannel low power SAADC.

Related