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

Stop advertising S112

Hi,

When I do not call advertising_start(erase_bonds); then I only draw about 2uA.

When I call advertising_start(erase_bonds); I draw 350uA.

I want to advertise. Then stop advertising after a period. I can do this using the following:

ble_advertising_start(&m_advertising, BLE_ADV_MODE_IDLE);
sd_ble_gap_adv_stop(m_advertising.adv_handle);

However, the current draw remains at 350uA. How can I stop advertising AND reduce my current?

Even when I reduce the timeout period, the device will stop advertising but will keep drawing 350uA.

Thanks,

Michael

Parents Reply
  • Hi,

    DC-DC is enable. Logging is also enabled.

    My code is based off the ble_app_hts example. I notice that sleep_mode_enter() calls sd_power_system_off(). However, I don't want to put the device into system off as I have no way to wake it up.

    I just want the device to essentially "sleep" for 5 minutes.

    A bit more info about my device. It is powered by 3V battery. It has two passive sensors that can be driven by GPIO pins. So I can turn them off by setting them to input with no pull. That's it :)

Children
  • Hi Mredp,

    Does your on_adv_evt() callback resemble the one below?

    static void on_adv_evt(ble_adv_evt_t ble_adv_evt)
    {
        uint32_t err_code;
    
        switch (ble_adv_evt)
        {
            case BLE_ADV_EVT_FAST:
                err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);
                APP_ERROR_CHECK(err_code);
                break;
            case BLE_ADV_EVT_IDLE:
                sleep_mode_enter(); // Will assert if chip is in debug interface mode
                break;
            default:
                break;
        }
    }

    This code is used in several of the SDK examples and will make the device enter System OFF mode on the advertisement timeout event (BLE_ADV_EVT_IDLE), but will only work if the chip is not in debug interface mode (emulated system OFF). So are you doing the same in your code, and are you measuring the current while having a debugger attached? That can possibly explain why you see increased current draw. 

Related