Quality RTOS & Embedded Software

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




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) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS