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

Parents
  • FormerMember
    0 FormerMember

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

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

Reply
  • 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();
    }
    }

Children
No Data
Related