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

FreeRTOS and low power modes

Posted by JMR on November 29, 2007
I'm writing an application using FreeRTOS on an Atmel ATmega640. One of the design goals is to allow the device to run off a NiMH battery pack for a couple of weeks at a time before it needs recharging.

My plan is to modify the timer tick rate when running on batteries so that tasks that need to be performed regularly can still be run. I would then put the processor in one of the low power modes until the next timer tick wakes the core up again.
Would this scheme work or are there points I need to watch out for?

Are there any plans to put some power management facilities into the RTOS?


RE: FreeRTOS and low power modes

Posted by Dave on November 30, 2007
A task can block either by calling a delay function, or by calling a queue function with a timeout. When it does this the time at which the task should unblock is calculated in ticks. If you slow down the tick rate then the time at which tasks actually unblock will be wrong because time is moving more slowly than when the wake time was specified. This might not be a problem to your application, for example if tasks only block indefinitely, or the wake time need not be exact.

Richard, this topic comes up from time to time. It would be cool to add in a feature that allowed the tick rate to be slowed down. All you need to do increment the tick by more than one each time if the tick rate were halved, or by four each time if the tick rate were quartered, etc.

RE: FreeRTOS and low power modes

Posted by Richard on November 30, 2007
> Richard, this topic comes up from time to time. It would be
> cool to add in
> a feature that allowed the tick rate to be slowed down. All
> you need to do
> increment the tick by more than one each time if the tick
> rate were halved,
> or by four each time if the tick rate were quartered, etc.


It would not be quite that simple, but it is a good idea. I will put some thought into it :o)

Regards.

RE: FreeRTOS and low power modes

Posted by JMR on November 30, 2007
Well in my application it doesn't matter too much.
Once in low power mode all I need to do is wake-up from an external interrupt or after a delay of 5-10 minutes, check the status of the various sensors and go back to low power mode if all OK.

I guess what I could do is to use another timer generating an interrupt every 5 minutes or so and disable the RTOS tick timer when going to sleep but enabling the aux timer interrupt.
In the aux timer ISR I could then enable the RTOS tick interrupt and carry on as if nothing had happened...

Ahhh so many options for doing this! Just trying to figure out which would be the better way of managing low power modes...

Richard: have you any plans to offer some sort of power management API in either freeRTOS or openRTOS?


[ 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