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


Values of configEXPECTED_IDLE_TIME_BEFORE_SLEEP below 2?

Posted by brunopaillard on November 9, 2016


I am working on an STM32L432, and trying to implement low-power features. Specifically, I am using the Tickless-Idle mode of FreeRTOS. I would like to be able to (when there is nothing else to do) wake-up through a periodic interrupt, perform minimal processing (about 100us worth), and immediately go back to sleep. I notice that by default, the value of configEXPECTEDIDLETIMEBEFORESLEEP is 2. With that value, the MCU stays awake for at least a whole tick period (1ms) before being able to sleep again (too long for me). I tried to force configEXPECTEDIDLETIMEBEFORESLEEP to 1, and that produced the correct behaviour: MCU falls back to sleep immediately if there are no tasks above Idle ready to run. But that triggers a compile error that says: “#error configEXPECTEDIDLETIMEBEFORESLEEP must not be less than 2”. I can disable that error, but I would like to better understand the dangers of doing so.

Q) What are the risk of side-effects of setting configEXPECTEDIDLETIMEBEFORESLEEP to a value < 2?

Note that in that project keeping a tight accounting of tick periods is not required. The tick counter could easily skip one tick or freeze for one tick, once in a while, without any problem.



Bruno Paillard Ph D Senior Designer Convergence Instruments tel: (819) 575 1990 email: bruno.paillard@convergenceinstruments.com web: www.convergenceinstruments.com

[ 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