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

SDK15.2 + SD 132 + freeRTOS = huge power consumtpion

Hei hi.

I'm developing simple beacon application with sdk 15.2, sd132 based on freeRTOS on nrf52832. The app and the whole project is built with help of ble_peripheral/ble_app_hrs_freertos example.

It works fine but the problem is power consumption which is around 850uA. I stipped all the tasks and peripherals and detected the problem. In ble_stack_init() function, after nrf_sdh_enable_request() call, power cons. goes up to 850uA and does not go down anymore. I need to call 

  • nrf_sdh_suspend();
  • nrf_sdh_evts_poll();
  • nrf_sdh_disable_request(); 
to reduce the power down. The same problem is with the HRS example. 
Is it possible to solve this somehow so that SD can turn itself when there's BLE event...?
I'm not even sure what might be the problem.
Thank you.
Parents
  • Hi flip,

    I think there is some anamoly with sd_app_evt_wait using MWU peripheral (unconfirmed)

    If you see the link here, I have added the #if 0 to comment out sd_app_evt_wait as I have seen some board use a lot of power using it. But later few customers said that commenting out sd_app_evt_wait results in increased power. So if on your board, sd_app_evt_wait consumes less power, then comment out the '#if 0' part in port_cmsis_systick.c file.

  • Hi Susheel.

    First of all, thank you very much for your reply.

    Comment/uncomment the code snippet definitely have a huge impact on power consumption. In my case: commented snippet: power consumption: 1mA. Uncommented: 7.5mA. This is power consumption on ble_app_hrs_freertos example (The GATT is disabled in the main, peer manager is there).

    But 1mA is still very far from 1.6uA. I'm referencing to the iBeacon example. For example, if I set adv. interval to 2 seconds, I measure between-advertisement-current 1.6uA. So it seems like the SD is inactive when there's no need for it. The same case with simple freeRTOS application without BLE. FreeRTOS goes to 1.6uA sleep when there's no task to execute. So I do not understand why BLE and freeRTOS combined do not work. Do I need to maybe use app_scheaduler for BLE events or peer_manager? I'm feeling like I'm missing something...

    Any thoughts?

  • Hi flip,

    I think you are comparing two different things.

    If you want to see the power overhead of FreeRTOS, then you should compare power consumption of two examples which are ble_app_hrs_freertos and ble_app_hrs (without freertos)

    I think the average current overhead of running the FreeRTOS kernel itself is a bit more than 100uA. The kernel needs to do the bookkeeping and that needs a lot of CPU time. If you are using tickless configuration, then increasing the advertising interval would definitely bring down sole FreeRTOS current overhead too.

    What I am saying is do the comparision between these two examples by increasing the radio parameters. I do not think  iBeacon example without FreeRTOS is a fair comparision to do with ble_app_hrs_freertos

Reply
  • Hi flip,

    I think you are comparing two different things.

    If you want to see the power overhead of FreeRTOS, then you should compare power consumption of two examples which are ble_app_hrs_freertos and ble_app_hrs (without freertos)

    I think the average current overhead of running the FreeRTOS kernel itself is a bit more than 100uA. The kernel needs to do the bookkeeping and that needs a lot of CPU time. If you are using tickless configuration, then increasing the advertising interval would definitely bring down sole FreeRTOS current overhead too.

    What I am saying is do the comparision between these two examples by increasing the radio parameters. I do not think  iBeacon example without FreeRTOS is a fair comparision to do with ble_app_hrs_freertos

Children
Related