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.

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

    Yes.

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

    Not without deactivating the peripherial. UART(E) will keep the HFCLK on in order to be able to transmit/receive.

    You can lower the current consumtion by using the integrated DCDC from a higher operating voltage (e.g. 3V3 instead of 1V8), but this won't help you when your design is intended for 1V8 operation.

  • Hi,

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

    This depends a bit on which UART are used. Both the UART and the UARTE peripherals has a run current of 55 uA, but in addition, both requires the HFCLK to run, which is about 400 uA. The UARTE peripheral also adds the EasyDMA current of about 1.2 mA to the current, when the UART is active. These are numbers for 3.0V supply, I would expect them to be higher at 1.8V.

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

    You can try to for the UART library to use the legacy UART peripheral, by setting the following configs in your sdk_config.h file:

    #ifndef UART_LEGACY_SUPPORT
    #define UART_LEGACY_SUPPORT 0
    #endif
    
    
    #ifndef UART0_CONFIG_USE_EASY_DMA
    #define UART0_CONFIG_USE_EASY_DMA 0
    #endif

    With these configs, I measure about 450 uA base current.

    Another option is to disable the RX part of the UART if you do not need this in your application. We have implemented this in NRF_LOG, and I measure 4 uA base current with this, as the UART peripheral is only active when a TX operation is happening. Since UART is asynchronous, there is no way to achieve this for RX, except having RX enabled at all times, or use additional control-signals to notify the chip in advance that a transfer will happen, to make it enable the RX mode.

    Best regards,
    Jørgen

  • Hello,

    thank you very much for your response.

    With these configs, I measure about 450 uA base current.

    I applied these changes to my sdk_config.h in my project, unfortunaly the current consumption is still at 1.35mA. Did you made more changes in the sdk_config.h?

    Another option is to disable the RX part of the UART

    I don´t need the RX part of the UART for my application. Where can I find this implementation for disabling the RX part of the UART in NRF_LOG?

    Thank you very much in advance.

  • I did my testing with ble_app_uart from SDK 17.0.2 on a nRF52 DK (PCA10040).

    Starting with unmodified example, I measure this current (1.875 mA):

    By adding the two changes to the sdk_config.h file I posted in my previous post (458 uA):

    Without adding the two previous changes, but setting the RX pin to UART_PIN_DISCONNECTED in comm_params passed to APP_UART_FIFO_INIT, the current is reduced to ~4 uA:

    Best regards,
    Jørgen

  • Hello,

    thank you very much for your response.

    I was able to disable the RX part of the UART by setting the RX pin to UART_PIN_DISCONNECTED. After I call the uart_init() function my increase in current consumption is far lower than 1.35mA.

    However, when my device is connected to the central and data is sent over NUS, the overall current consumption is the same as before.

    It looks like, that this change is revoked at some point when the SoftDevice starts.

    1. Do you have any suggestions what could cause this behaviour?

    2. Do you have an idea how to solve this issue?

    Thank you so much in advance.

Related