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

BLE MESH UART disable for low power node - current consumption remains above 200uA @ 3V (Mesh SDK 4.1.0)

Hi,  I'm trying to implement a mesh serial node with LPN capability, where the UART can be disabled to save power, and then re-enabled via a GPIO.

I am measuring current using an ammeter attached to P22 on an nRF52833-DK - the DK is powered via the USB IF MCU (I understand this is not optimal - but at this time I just need rough figures).  The voltage at P22 is 3v

With nrf_mesh_serial_enable() and nrf_mesh_serial_enable() excluded from the build at compile time the LPN is able to create a friendship with a friend node at at this point the current consumption is  < 10uA

With nrf_mesh_serial_enable() and nrf_mesh_serial_enable() included in the build the UART interface operates correctly, and current consumption when friendship is established is around 500uA

I created a UART opcode to call the function below (which I copied from the mesh bootloader)

uint32_t serial_handler_uart_disable(void)
{
    /* Disable the IRQ and restore default values of serial registers. */
    NVIC_DisableIRQ(UART0_IRQn);
    NRF_UART0->INTENCLR = 0xFFFFFFFF;
    NRF_UART0->TASKS_STOPRX = 1;
    NRF_UART0->TASKS_STOPTX = 1;
    NRF_UART0->ENABLE = 0x00000000;

    return NRF_SUCCESS;
}

After calling this function the current consumption falls from 500uA to 200uA.

My question is why is the current still 200uA and not 10uA or lower - what other action do I need to take to lower the current consumption to what it is if the UART is never initialized (i.e. excluded from the build).

thanks !

Parents
  • I found the source of the 200uA current "leakage" - if I tri-state the UART GPIOs when disabling the UART the 200uA becomes 5uA:

    uint32_t serial_handler_uart_disable(void)
    {
        /* Disable the IRQ and restore default values of serial registers. */
        NVIC_DisableIRQ(UART0_IRQn);
        NRF_UART0->INTENCLR = 0xFFFFFFFF;
        NRF_UART0->TASKS_STOPRX = 1;
        NRF_UART0->TASKS_STOPTX = 1;
        NRF_UART0->ENABLE = 0x00000000;

        // Tristate GPIOs to reduce current
        nrf_gpio_cfg_default(RX_PIN_NUMBER);
        nrf_gpio_cfg_default(CTS_PIN_NUMBER);
        nrf_gpio_cfg_default(TX_PIN_NUMBER);
        nrf_gpio_cfg_default(RTS_PIN_NUMBER);
        
        return NRF_SUCCESS;
    }

    (Not for the first time) I think I answered my own question.  (The clue was the 200uA current spike when I pressed Button1..4).

Reply
  • I found the source of the 200uA current "leakage" - if I tri-state the UART GPIOs when disabling the UART the 200uA becomes 5uA:

    uint32_t serial_handler_uart_disable(void)
    {
        /* Disable the IRQ and restore default values of serial registers. */
        NVIC_DisableIRQ(UART0_IRQn);
        NRF_UART0->INTENCLR = 0xFFFFFFFF;
        NRF_UART0->TASKS_STOPRX = 1;
        NRF_UART0->TASKS_STOPTX = 1;
        NRF_UART0->ENABLE = 0x00000000;

        // Tristate GPIOs to reduce current
        nrf_gpio_cfg_default(RX_PIN_NUMBER);
        nrf_gpio_cfg_default(CTS_PIN_NUMBER);
        nrf_gpio_cfg_default(TX_PIN_NUMBER);
        nrf_gpio_cfg_default(RTS_PIN_NUMBER);
        
        return NRF_SUCCESS;
    }

    (Not for the first time) I think I answered my own question.  (The clue was the 200uA current spike when I pressed Button1..4).

Children
No Data
Related