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

Current consumption ble

Hi,

I'm using nrf52832 with s132, so I don't find any information about the current consumed by the device when I'm connected by Bluetooth. I use the driver st7735 and an LCD screen. When my phone is not connected by Bluetooth and my device sleep, the current is 0.43mA. When my phone is not connected, and the LCD screen is ON, the current is around 3.4mA. Until then, everything is normal. But when I'm connected and my device is sleeping, the current is 1.5mA, and if the screen is ON the current is 0.7mA. So I don't understand why the current is increased when I'm connected and when my device is sleeping? And why the current decrease when the screen displays something. On online power profiler, the power consumes when there is a connection but the device is asleep is not indicated, so I don't know if it is normal or not. 

Thanks,

Lydie

  • No in mA, otherwise it doesn't work. When I'm connected, I do that:

    case BLE_GAP_EVT_CONNECTED: {
        NRF_LOG_INFO("Connected.");
        printf("Connected.\n");
        err_code = bsp_indication_set(BSP_INDICATE_USER_STATE_OFF);
        APP_ERROR_CHECK(err_code);
        // Assign connection handle to the Queued Write module.
        m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
        err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
        APP_ERROR_CHECK(err_code);
         
        memset(&m_ble_db_discovery,0,sizeof(m_ble_db_discovery));
        // Discover peer's services.
        err_code = ble_db_discovery_start(&m_ble_db_discovery,
            p_ble_evt->evt.gap_evt.conn_handle);
        APP_ERROR_CHECK(err_code);
    
        // Used to track connections state
        isConnected = true;
    
       // sd_ble_gap_rssi_start(p_ble_evt->evt.gap_evt.conn_handle, 3, 0);

    When I'm not connected, I'm advertising because I call advertising_start() in the main function. The advertising interval is :

    #define APP_ADV_INTERVAL 40
    So it is less than 100ms.

    I print something in all event handler function (which represents all services I use)
    like on_hts_evt(), on_cts_c_evt, fds_evt_handler, pm_evt_handler, saadc_event_handler, db_disc_handler, gatt_evt_handler, on_adv_evt, nus_data_handler, on_ias_evt, on_lls_evt, on_ias_c_evt, ble_evt_handler, bsp_event_handler
    No events appear in these functions. So how can I know what event is keeping my cpu from sleeping?  

  • OK, so the nRF device is acting as the BLE central and the phone is the BLE peripheral?

    lydie said:
    I print something in all event handler function (which represents all services I use)
    like on_hts_evt(), on_cts_c_evt, fds_evt_handler, pm_evt_handler, saadc_event_handler, db_disc_handler, gatt_evt_handler, on_adv_evt, nus_data_handler, on_ias_evt, on_lls_evt, on_ias_c_evt, ble_evt_handler, bsp_event_handler
    No events appear in these functions. So how can I know what event is keeping my cpu from sleeping?  

     Ok, then we need to check if idle_state_handle() is returning immediatly or not. Do you have the possiblity to  toggle a GPIO after calling idle_state_handle() and then monitoring the GPIO using a logic analyzer or oscilloscope?

    Note that having logging enabled will increase the current consumption so it should be disabled when measuring the current consumption. Thats why I usually toggle a GPIO instead of printing log statements.

    Best regards

    Bjørn

  • Yes that’s right. When idle_state_handle() is called, an event arrives and immediately wakes up the device, so the current has not time to decrease. I print something in the idle_state_handle() function, and it is print a lot of time like it was trying to sleep but it couldn’t. 

    Yes I disabled Log. 

  • Ok, so when you print you're not using the nRF_LOG API? Or do you mean that you tested bot with log enabled and with logging disabled?

    If none of the event handlers below are called then I would check the peripherals that you are using in your application, i.e. see if any of the EVENTS_xxxx registers are set to 1 prior to calling sd_app_evt_wait().

    Best regards

    Bjørn

  • No I’m not using Log API. What do you mean by EVENTS_xxxx

Related