Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


low power mode transition with freeRTOS

Posted by pavel on October 28, 2011
I work with STM32 CortexM3 and I want to go to low power mode (sleep mode) My idea is as follows:
1) Stop all peripherals except those that I want to be woke up from.
2) call vTaskSuspendAll()
3) call WFI that stops the core
4) after wakeup, check the wakeup reason
5) and call vTaskResumeAll()
6) Now the OS is running as normal and I proceed with peripheral initialization
I wonder if the described steps are sufficient and if I didn't miss something important on the OS site.

Thank you very much for any reply

RE: low power mode transition with freeRTOS

Posted by Richard on October 29, 2011
It really depends on what you want the kernel to be doing while you are in sleep mode.

To keep track of time, and therefore to unblock tasks at the right time, you need to keep the tick interrupt running (see the exception below, about a tickless version of FreeRTOS). That means the tick interrupt will periodically bring the Cortex-M3 out of sleep mode, which can limit the power saving. There are ticks you can do, like reducing the tick frequency by a factor (say 10 for example) then calling the increment tick function 10 times each time the tick brings the CPU out of sleep.

For real power saving, there is a tickless version of FreeRTOS that removes the need for FreeRTOS to periodically wake the CPU up. It requires an external low power crystal (like a watch crystal) to allow even the timers to be turned off. I have provided a link below, which also contains a thesis on the subject.



RE: low power mode transition with freeRTOS

Posted by pavel on October 31, 2011
thank you for detailed answer


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists