Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Going low power in freertos app

Hi, 

I have an app based on freertos_hrs example (nRF52832, SDK14.2)

I'm trying to get it into low power(sleep) mode, however the idle task keep on running and the system consumes ~4.5mA constantly (ble is off most of the time)

I tried the following:

  • Setting #define configUSE_TICKLESS_IDLE   1 in freeRTOSConfig.h but is does not seem to help.
  • Disabled NRF_Log options in sdk_config.h as several posts suggested
  • Verified that none of my app's tasks is running (All are blocked), neither is the timer task. The only task that seem to run is the idle task.
  • Verified that the idle task handler portTASK_FUNCTION() (part of freertos port) do get to the line portSUPPRESS_TICKS_AND_SLEEP() that eventually calls sd_app_evt_wait()

  • I tried to forcefully call sd_app_evt_wait() from within  the applications idle hook (vApplicationIdleHook(), #define configUSE_IDLE_HOOK  1)
    It does lower the consumed power to few uA, but I keep getting hard faults when ble activity is encountered (not sure exactly what is the cause) - e.g. advertising goes well but when connection is established ble_evt_handler() crashes in case BLE_GAP_EVT_CONNECTED block

Reading the doc it seems that implementing the 1st bullet above should take care of lowering the power but apparently something else is not set correctly.

Any help will be highly appreciated

Thanks in advance

Related