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

Application with FreeRTOS - lowest possible current in idle.

I am about to start new quite complex project with nRF52 and I thought that maybe it is high time to use freeRTOS port from SDK.  As the device is going to be powered with a CR2032 battery I wanted to check how the current consumption looks like. There are some similar post on the Nordic DevZone so I have read them first. After that my impression was that there are some problems and the power consumption with FreeRTOS is not well optimized so it is not a good choice for battery devices. None of the posts I have read used SDK15 so I have decided to test it myself based on ble_app_hrs_freertos example.

If I understand correctly tickless idle should be the lowest power mode and there should be no extra interrupts needed normally by any RTOS. I have tried different freeRTOS configurations (for example using RTC instead of SysTick). I have also disabled nrf log module but I am not able to get the DC base under 780 uA. 

In nrf52832 product specification I can see that typical ultra-low power current consumption for System ON, Full RAM retention, Wake on any event is less than 2 uA and thats what I would expect in idle state for application running with FreeRTOS and tickless idle enabled. I know that I can easily achieve such low values without RTOS (I already do that in another project) but my question is what is the lowest possible value for current in tickless idle for application with FreeRTOS. Has anyone achieved values that are near to those from product specification? It should be possible to achieve 2 uA with tickless idle, isn't it? If someone knows the recipe for the success it is welcomed to share the FreeRTOS config :).

Parents
  • Hi,

    Not sure how you are calculating the base current.

    But can you do a simple idle test with the following change in SDK\external\freertos\portable\CMSIS\port_cmsis_systick.c file

    //#if 0  // With FreeRTOS sd_app_evt_wait increases power consumption with FreeRTOS compared to _WFE (NRFFOSDK-11174)
    #ifdef SOFTDEVICE_PRESENT
                if (nrf_sdh_is_enabled())
                {
                    uint32_t err_code = sd_app_evt_wait();
                    APP_ERROR_CHECK(err_code);
                }
                else
    #endif
    //#endif // (NRFFOSDK-11174)

    Notice that i have commented out now the #if 0 line. If you get better results, then i will remove them and check that in the SDK.

  • Hi

    With this modification I have much worse results. Current increased on my board from 1 mA to 7 mA. I think Nordic should  really look into current consumption of FreeRTOS apps. Especially ble_app_hrs_freertos which is expected to be an example to follow. But now current consumption is quite high. A lot could be improved. I know that you have seen nRF52840, SDK 14.0.0 and tickless idle FreeRTOS - some suggestions topic. Someone did great job there. Current consumption dropped on my board from 1 mA to 100 uA. I hope Nordic does similar optimization of ble_app_hrs_freertos for nRF52832 and newest SDK. Does Nordic plan to release really power optimized FreeRTOS example?

Reply Children
No Data
Related