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

ble_central_and_peripheral Power waste

I use sdk15.0.close log.

config:

#define APP_ADV_INTERVAL                2000

#define SCAN_INTERVAL                   2000

#define SCAN_WINDOW                     0x0050

code:

main()

{

  clock_init();

    power_management_init();
    ble_stack_init();
    timers_init();
    buttons_leds_init(&erase_bonds);
    peer_manager_init();
    gap_params_init();
    gatt_init();
   conn_params_init();
   db_discovery_init();
   hrs_c_init();
    services_init();
  advertising_init();
    // Start execution.
    application_timers_start();
  erase_bonds=true;
  nrf_sdh_freertos_init(adv_scan_start, &erase_bonds);
  // Start FreeRTOS scheduler.
  vTaskStartScheduler();

}

What else can I do? Can reduce its power consumption.

Parents
  • Hi,

    Can you do a quick experiment and try the same example without freertos.

    You only need to change to files in your project. instead of app_timer_freertos.c use app_timer.c and instead of nrf_sdh_freertos.c use nrf_sdh.c.

    replace last threelines of your main.c with below

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

    and measure the power again.

    You will then know how much difference in power you have in baremetal vs rtos app.

    I am guessing about 80uA. If it is way more, then something is wrong.

Reply
  • Hi,

    Can you do a quick experiment and try the same example without freertos.

    You only need to change to files in your project. instead of app_timer_freertos.c use app_timer.c and instead of nrf_sdh_freertos.c use nrf_sdh.c.

    replace last threelines of your main.c with below

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

    and measure the power again.

    You will then know how much difference in power you have in baremetal vs rtos app.

    I am guessing about 80uA. If it is way more, then something is wrong.

Children
Related