cancel
Showing results for 
Search instead for 
Did you mean: 

Freertos low Power Run mode

Epamuk
Associate III

Hi guys,

I use stm32L4 and freertos, I try to make low power run mode in my project. Normally my mcu works 60Mhz but I want to reduce clock as much as possible in low power run mode like 1Mhz and I want to use freertos in low power run mode. I change clock configuration before low power run mode but in low power run mode freetos osDelay time change.

I need and example application for how to use low power run mode with freertos.

1 REPLY 1
JPeac.1
Senior

Soft timers in FreeRTOS are based on the system tick, normally derived from the SYSTICK timer but ST uses an alternate source in the HAL. If you reduce the clock rate used by the system tick then any delays will be reduced as well. So going from 60MHz to 1MHz means the delay call will be 60 times longer in duration.

You will need to adjust the timer count for RTOS system tick when you decrease or increase clocks. For SYSTICK stop the timer, change the reload and restart the timer. For whatever timer ST uses follow the same general procedure.

Bear in mind if you use preemptive multitasking the time slice for executable tasks will be affected by changing the system tick. Ideally all non-essential tasks are suspended in low power run mode.

Jack Peacock