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

High current issue resulted from UART in nRF52832

    I am developing my code in a custom nrf52832 breakout board. My code was modified from the example "ble_app_uart".

I find a high current issue with UART. The current is around 58uA as I expected after power startup with RX and TX pins

connected to a USB to TTL dongle. 

But if the Rx and Tx pins are not connected and power up nRF52832, the current goes to 2.24mA. At this moment if I connect

the Rx and Tx pins, the current will go to 58uA.

       

It seems that nRF52832 can`t go into sleep on mode. But I bad disable UART in my code as the following:

#ifndef DEBUG_MODE
/* Disable UART */
// NRF_UART0->ENABLE = 0;
app_uart_close();
nrf_gpio_cfg_default(6);
nrf_gpio_cfg_default(8);
nrf_gpio_cfg_default(5);
nrf_gpio_cfg_default(7);
#endif

In order to go into sleep on mode, my code is as following:

/**@brief Function for placing the application in low power state while waiting for events.
*/
static void power_manage(void)
{
uint32_t err_code = sd_app_evt_wait();
APP_ERROR_CHECK(err_code);
}
/**

The detail of my software and hardware are as following:

1. SDK 12.2.0

2. Softdevice S132 3.0.0

3. IDE: Keil V5.25.2.0

4. nRF52832 chip version: CIAAB0

5. Ble advertising interval: 1000ms

  • FormerMember
    0 FormerMember

    Do you see the same if you test the uart example in the peripheral folder ( ..\examples\peripheral )?

  • Hi Kristin,

        I had not check the result if I use the uart example in the peripheral folder. I will test the example to see if it is the same in

    next Monday. Thanks for your suggestion.

  • The USB to TTL dongle will provide power to the nRF52832 via the internal schottky protection clamp diodes unless the USB to TTL voltage (typically 3.3 volts) is the same as the nRF52832 Vdd (typically 2.8 volts or less). With the Rx and Tx line disconnected you are seeing the true consumption, with Rx and Tx connected the measured value is incorrect. As a test, use the USB to TTL dongle voltage as the Vdd source for the nRF52832; usually this is available on a header unless it is the encased type. When connected thus the Rx and Tx will work but you will see the higher current consumption.

    This is commonly referred to as phantom power.

  • Hi Kristin,

        This morning I do several tests based on the "ble_app_uart" code. I add a 10ms APP_TIMER to be the same with my

    appliction code. The following are the test conditions and results:

    Items / Conditions / Results 

    1/ Uart not initialized / current is normal (46uA)

    2/ Uart initialized / current is kept high (2.26mA)

    3/ Uart initialized; UART disabled by app_uart_close() after  ble_stack_init() / After power on, the current is kept high (2.26mA) for several seconds.

    4/ Uart initialized; UART disabled by app_uart_close() before ble_stack_init() / The current is normal as test item 1.

    All the above test conditions are Rx and Tx pins disconnected. The nRF52832 is powered by USB_TO_TTL dongle 3.3V. 

    The main loop of my code:

    int main(void)
    {
    uint32_t err_code;
    bool erase_bonds;

    uint32_t i;

    // Initialize.
    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
    uart_init();

    //buttons_leds_init(&erase_bonds);
    ble_stack_init();

    gap_params_init();
    services_init();
    advertising_init();
    conn_params_init();

    app_timer_create(&fbm320_timer_id,
    APP_TIMER_MODE_REPEATED,
    timer_fbm320_handler);
    app_timer_start(fbm320_timer_id, APP_TIMER_TICKS(10, APP_TIMER_PRESCALER), NULL);

    // printf("\r\nUART Start!\r\n");

    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);

    app_uart_close();


    // Enter main loop.
    for (;;)
    {
        power_manage();
    }
    }

  • Hi hmolesworth,

        Thanks for your reply. I check the connection of my board. The power of nRF52832 is form USB to TTL 3.3v output pin.

    With the same connection, if I don`t initialize the UART in my code, the current is normal. So it seem not only related to hardware connection.    

Related