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

how to achieve BLE with beacon low power UART communication?

Hello,

I have been struggling with managing power consumption of my nRF52832 so it can stay low. I'm using nRF5_SDK_17.0.0_9d13099. I did some extensive search on the available threads, but couldn't find any suggestion that can solve my problem. These are some links of similar issues i've been reading so far

https://devzone.nordicsemi.com/f/nordic-q-a/27147/how-to-configure-uart-with-low-power

https://devzone.nordicsemi.com/f/nordic-q-a/47578/nrf52832-uart-power-consumption

https://devzone.nordicsemi.com/f/nordic-q-a/43684/why-is-uart-without-dma-deprecated

https://devzone.nordicsemi.com/f/nordic-q-a/35510/uart-deinit-does-not-reduce-power-consumption-and-it-too-big-600ua

https://devzone.nordicsemi.com/f/nordic-q-a/26030/how-to-reach-nrf52840-uarte-current-supply-specification/102605#102605

https://devzone.nordicsemi.com/f/nordic-q-a/19284/turn-off-uart-on-nrf52832

According to some suggestions, I should disable Easy DMA for my UART setup. however, my UART stop working the moment I stop using Easy DMA.

sdk_config.h

#define UART_EASY_DMA_SUPPORT 1         // set 0 will cause UART stop working
#define UART_LEGACY_SUPPORT 1
#define UART0_CONFIG_USE_EASY_DMA 1     // set 0 will cause UART stop working

The other suggestions I've seen so far were closing and disabling the UART after I'm done using it. 

here's my uart_init function, taken from the available example. 

static void uart_init(void)
{
    uint32_t                     err_code;
    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = RX_PIN_NUMBER,
        .tx_pin_no    = TX_PIN_NUMBER,
        .rts_pin_no   = RTS_PIN_NUMBER,
        .cts_pin_no   = CTS_PIN_NUMBER,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
#if defined (UART_PRESENT)
        .baud_rate    = NRF_UART_BAUDRATE_115200
#else
        .baud_rate    = NRF_UARTE_BAUDRATE_115200
#endif
    };
    nrf_gpio_cfg_input(RX_PIN_NUMBER, NRF_GPIO_PIN_PULLUP);

    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);
}

Disabling uart according to available suggestions doesn't solve my issue. my board still consume +2 ~ 3mA after I disable my UART.

static void disabling_uart(void) 
{
    app_uart_flush();
    uint32_t err_code = app_uart_close();
  //  APP_ERROR_CHECK(err_code);
    NRF_UARTE0->TASKS_STOPTX = 1;
    NRF_UARTE0->TASKS_STOPRX = 1;
    NRF_UARTE0->ENABLE = 0;
    /* Workaround by disabling the UART peripherals due to Nordic SDK15.0 issue */
    *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */
    *(volatile uint32_t *)0x40002FFC;     
    *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */
}

I only need to use UART RX interrupt once per hour. Is there any way to solve my issue? Example of UART without Easy DMA, or how to properly disable UART after using it would be appreciated.

Thank you.

Parents
  • Hi,

    2-3 mA solely for the UART module is indeed high. 

    Are you measuring on a custom board or a DK? If you're measuring on a custom board, have you made sure that current that you measure is solely consumed by the nRF52 and not any other peripherals existing on the board? And lastly how are you measuring the current? 

    best regards

    Jared 

Reply
  • Hi,

    2-3 mA solely for the UART module is indeed high. 

    Are you measuring on a custom board or a DK? If you're measuring on a custom board, have you made sure that current that you measure is solely consumed by the nRF52 and not any other peripherals existing on the board? And lastly how are you measuring the current? 

    best regards

    Jared 

Children
No Data
Related