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




Loading

DSM and Low power mode

Posted by yariv gal on July 1, 2009
Hi,
I am trying to figure out is the FreeRTOS support DeepSleepMode or LowPower mode ? if no,Is there any way to hooke the OS to lowpower or sleep mode?
Any piece of code example will be appreciated.

Thanks,

RE: DSM and Low power mode

Posted by Samuel Tardieu on July 1, 2009
The way it is often done is by defining an idle task (executed when nothing else is ready to execute) which puts the processor in whatever sleep mode you want.

RE: DSM and Low power mode

Posted by Adam Turowski on July 1, 2009
The easy way to hook into idle task without having to modify FreeRTOS code is to use
void vApplicationIdleHook( void ) function to do the job putting processor in sleep mode. To use it you have to include

#define configUSE_IDLE_HOOK 1

in your FreeRTOSConfig.h file.

RE: DSM and Low power mode

Posted by yariv gal on July 1, 2009
Thanks for quick answer.
In that case when I call vApplicationIdleHook( void ) what makes the processors to wake up again?
I guess that in case of idle task, interrupt will wakeup the system.
Also is there any watchdog timer for each task ?

Thanks

RE: DSM and Low power mode

Posted by Adam Turowski on July 2, 2009
Almost all CPUs are woken up from sleep mode by interrupt. So the same applies to FreeRTOS.

When CPU will be woken up by interrupt, interrupt service routine will wake up any task waiting for data provided by this ISR. CPU will be active until all pending tasks will be executed and then idle task will be executed. This in turn will call vApplicationIdleHook( void ) putting CPU back into sleep mode.

Please note that FreeRTOS uses tick timer interrupt to run preemptive scheduler. This interrupt occurs (usually) every 1ms. So CPU will be woken up every 1ms, any pending task will be executed and then idle task will be called to put CPU back to sleep.

Regarding watchdog timer question there is no such timer for each task. You have to implement it yourself if you really need it.

Hope that helps,
Adam


[ 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