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

nRF52 FreeRTOS Power Consumption Tickless Idle

I have a project using FreeRTOS with Tickless idle enabled, SDK 11.0.0 alpha and the S132 soft device. Currently the project is consuming ~6.5mA average, ~5.2mA if advertising is disabled.

This is on our own hardware platform but I have confirmed all of our peripheral devices are shutdown.

During my research I saw several posts reference switching on the DC/DC via this call sd_power_dcdc_mode_set. Where should this call be placed?

Also what's the best way to ensure that the the processor is being put to sleep?

Thanks, Darren

Parents
  • Hello.

    6.5 mA indicates that the cpu is running most of the time. In the tickless idle mode, the chip is put to sleep when no task is running. It is woken up by any interrupt source, in addition to the wakeup timer of the scheduler.

    This means that you either have interrupts triggering frequently, or that your rtos tasks are not sleeping. If the chip is not woken up by other interrupts, your chip should sleep when you call vTaskDelay or other function that make your task sleep.

    You can call sd_power_dcdc_mode_set() in main(), after you have enabled the softdevice. If the softdevice is enabled in some rtos task, you call this function there instead. To use the DCDC, you must have some external components. See the page about power supplies in the product spec.

  • Anders,

    Thanks for the reply! I have temporarily disabled tickless idle and switched back to the idle task, see below. The debug IO is being toggled at a rate of 4.40us which is close to the rate we have set our PWM to. Is it possible we are missing an event in the PWM hardware module?

    /** Called when there is no work for the OS to do.
    
    • In the case of this design that means once every tick. */ void vApplicationIdleHook( void ) { nrf_gpio_pin_toggle(DEBUG_PIN);

      uint32_t err_code = sd_app_evt_wait(); APP_ERROR_CHECK(err_code); }

Reply
  • Anders,

    Thanks for the reply! I have temporarily disabled tickless idle and switched back to the idle task, see below. The debug IO is being toggled at a rate of 4.40us which is close to the rate we have set our PWM to. Is it possible we are missing an event in the PWM hardware module?

    /** Called when there is no work for the OS to do.
    
    • In the case of this design that means once every tick. */ void vApplicationIdleHook( void ) { nrf_gpio_pin_toggle(DEBUG_PIN);

      uint32_t err_code = sd_app_evt_wait(); APP_ERROR_CHECK(err_code); }

Children
No Data
Related