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

Power consumption on FreeRTOS with SDK 15.3

Hardware: PCA10040, PPK

SDK: nRF5_SDK_15.3.0_59ac345

I test hrs app and get these number in current consumption during advertising. No modification on example projects. 

ble_app_hrs_freertos_pca10040_s132: 8.3mA

ble_app_hrs_pca10040_s132: 1.2mA

I want to use FreeRTOS. How do I get minimal current consumption with it?

  • Hi

    Are you sure you're looking at the average current consumption for both applications? The FreeRTOS application is expected to run at ~50-100µA more than the "regular" example due to FreeRTOS bookkeeping, etc. 

    If you zoom out in the power profiler app, the average current should be a lot more similar. I just tested it here and the ble_app_hrs example runs at an average of ~400µA, while the ble_app_hrs_freertos example runs at an average of ~500µA which is expected.

    Best regards,

    Simon

  • I retest the boards and got the following result:

    pca10040(1.2.4):

    ble_app_hrs_freertos_pca10040_s132: 521 uA

    ble_app_hrs_pca10040_s132:  571 uA

    pca10056(1.1.0):

    ble_app_hrs_freertos_pca10056_s140: 6.1 mA

    ble_app_hrs_pca10056_s140: 3 mA

    Build with the following changes in sdk_config.h:

    NRF_LOG_BACKEND_RTT_ENABLED 1
    NRF_LOG_BACKEND_UART_ENABLED 0
    NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0

    Firmware is built by SES.

    Use external supply pin to supply power. No other USB/Jlink connection.

    Current consumption of pca10040 is normal now. However, pca10056 still has very high current consumption. Any advise?

    ble_app_hrs_freertos_pca10040_s132

    ble_app_hrs_pca10040_s132

    ble_app_hrs_freertos_pca10056_s140

    ble_app_hrs_pca10056_s140

  • Hi

    I tried this myself on the nRF52840 DK (pca10056). For the ble_app_hrs example, I measured ~600µA of current consumption. This seems correct, seeing as the nRF52840 draws a bit more current than the nRF52832.

    The ble_app_hrs_freertos example drew about 7mA. Which is way too much. Luckily, this problem has been reported before, and I think it might be the same issue we're encountering. Please check out the verified answer in this post, where my colleague Susheel suggests changing a few lines of code in the port_cmsis_systick.c file. Apparently, this is an issue with some select chips when using FreeRTOS. So try changing these lines of code, and see if that gets the current consumption down in the FreeRTOS example.

    As for the regular example, I think you must have made an error when measuring. If this doesn't help, please check if reverting the sdk_config.h file changes help at all. It might be that the RTT and UART peripheral are both kept running, which is what causes this current draw.

    Best regards,

    Simon

  • After switching to "nRF only". The current drops down.

    pca10056 with ble_app_hrs_pca10056_s140: ~150uA

    As for FreeRTOS, after applying the suggestion of the following link

    https://devzone.nordicsemi.com/f/nordic-q-a/35386/application-with-freertos---lowest-possible-current-in-idle/160818#160818

    ble_app_hrs_freertos_pca10056_s140: ~185 uA

  • Hi

    That's great! Glad you got it working.

    Best regards,

    Simon

Related