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

CortexM4 doesn't appear to be sleeping when using configUSE_TICKLESS_IDLE 1

Posted by pugglewuggle on February 26, 2014

I could be wrong about this or just don't know how to verify the device is sleeping, but it doesn't appear to be sleeping even though configUSETICKLESSIDLE is defined as 1. I've checked FreeRTOS viewer and all tasks are blocked, only IDLE is running. Is there a way for me to verify the chip is sleeping? I don't currently have a place to plug in an ammeter on the development board and the default sleep mode (Sleep) of the Atmel SAM4S I'm using doesn't turn off the master clock.


CortexM4 doesn't appear to be sleeping when using configUSE_TICKLESS_IDLE 1

Posted by rtel on February 27, 2014

Look for the suppress ticks and sleep function in whichever port.c file you are using and put a break point in it. Is the break point ever hit? If not look for where the function is called from task.c, put a break point there to see why the function is not called - maybe the calculated sleep time never reaches the threshold necessary.

Regards.


CortexM4 doesn't appear to be sleeping when using configUSE_TICKLESS_IDLE 1

Posted by pugglewuggle on February 27, 2014

I already did that before I posted so I am certain it is never being hit but since I'm not 100% familiar with all the internal workings of the kernel I thought maybe there was something else going on inside of it. We have the configEXPECTEDIDLETIMEBEFORESLEEP set at its default value of 2 (we haven't define it).

On top of that I put breakpoints in tasks.c at every point where a function is called or code executed inside #if configUSETICKLESSIDLE != 0 blocks and I'm still never hitting any of the breakpoints.


CortexM4 doesn't appear to be sleeping when using configUSE_TICKLESS_IDLE 1

Posted by rtel on February 27, 2014

It's difficult to say without being able to see a debug session. If the breakponts are being set then the code must be being compiled in so it a matter of viewing the variable values as you step through to ascertain why the code is not entered.

Regards.


CortexM4 doesn't appear to be sleeping when using configUSE_TICKLESS_IDLE 1

Posted by kamab on March 4, 2014

Are you sure your application is ever being given the chance to sleep? Usually you would need > 2 ticks to pass without any task being scheduled to allow for tickless mode to be entered.

You should hit those breakpoints. Look for an error in your config file.


[ 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