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

NRF52832 UART Power consumption

Hi,

I just wanna start off by saying I know there a lot of similar posts to this one here on the dev zone, but my problem with them is that none of them (from what I've seen) give a good answer what to do in order to reduce the power consumption of the UART peripheral when it's active.

My observation is that as soon as I activate the UART (data is constantly sent when activating the UART) the current consumption averages around 2.4mA. I need to be able to reduce this as much as possible.

One of the topics I found was this one:
https://devzone.nordicsemi.com/f/nordic-q-a/28439/gpio-and-uart-with-low-power-consumption

however the solutions presented in that topic only reduces current consumption when the UART is idle.

Another topic that is similar to mine, but not answered:

devzone.nordicsemi.com/.../how-to-configure-uart-with-low-power

Furthermore, I found the low power examples for nRF51:

https://github.com/NordicPlayground/nrf51-UART-examples/tree/master/ble_app_uart_low_power

Are these valid for nRF52 as well? or are there some equivalent examples for nRF52?

SDK: v15.0

HW: nRF52832 PCA10040

Br,
Anton

Parents
  • Hi,

    Are you using the UARTE peripheral (UART with EasyDMA enabled)? If you are, you will most likely not be able to reduce the run current of the UART very much. Are you using the UART driver, or APP_UART library? If you could share your code/project, I can help give you some advice.

    Best regards,
    Jørgen

  • Hi Jörgen,

    I'm not actully sure if I'm using UARTE or UART,  but looking at the nrf_drv_uart.c I think I'm using UART since I do not have NRF_DRV_UART_USE_UARTE defined in my sdk_config.h. The only define I can find relating to DMA and UART in my sdk_config is UART_EASY_DMA_SUPPORT (set to 1), however if I set it to 0 I receive errors when compiling about things being undefined in nrf_drv_uart.c

    I'm using the APP_UART library. Here is the initialization:

    static void uart_init(void)
    {
        uint32_t err_code;
    
        app_uart_comm_params_t const comm_params = {
            .rx_pin_no    = 8, //RX_PIN_NUMBER,
            .tx_pin_no    = 6, //TX_PIN_NUMBER,
            .rts_pin_no   = 5, //RTS_PIN_NUMBER,
            .cts_pin_no   = 7, //CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
            .baud_rate    = NRF_UART_BAUDRATE_230400
        };
    
        APP_UART_FIFO_INIT(&comm_params,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code);
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("uart_init(), err_code=%d", err_code);
    }

    The rest is just app_uart_get / app_uart_put

    Br,
    Anton

Reply
  • Hi Jörgen,

    I'm not actully sure if I'm using UARTE or UART,  but looking at the nrf_drv_uart.c I think I'm using UART since I do not have NRF_DRV_UART_USE_UARTE defined in my sdk_config.h. The only define I can find relating to DMA and UART in my sdk_config is UART_EASY_DMA_SUPPORT (set to 1), however if I set it to 0 I receive errors when compiling about things being undefined in nrf_drv_uart.c

    I'm using the APP_UART library. Here is the initialization:

    static void uart_init(void)
    {
        uint32_t err_code;
    
        app_uart_comm_params_t const comm_params = {
            .rx_pin_no    = 8, //RX_PIN_NUMBER,
            .tx_pin_no    = 6, //TX_PIN_NUMBER,
            .rts_pin_no   = 5, //RTS_PIN_NUMBER,
            .cts_pin_no   = 7, //CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
            .baud_rate    = NRF_UART_BAUDRATE_230400
        };
    
        APP_UART_FIFO_INIT(&comm_params,
                           UART_RX_BUF_SIZE,
                           UART_TX_BUF_SIZE,
                           uart_event_handle,
                           APP_IRQ_PRIORITY_LOWEST,
                           err_code);
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("uart_init(), err_code=%d", err_code);
    }

    The rest is just app_uart_get / app_uart_put

    Br,
    Anton

Children
No Data
Related