Quality RTOS & Embedded Software

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




Loading

Tickless idle query

Posted by l4na on April 22, 2014

Regarding the tickless idle implementation for the Cortex M3, I notice that it calls in this sequence: _asm volatile( "cpsid i" ); //disable interrupt ... if( xModifiableIdleTime > 0 ) { __asm volatile( "wfi" ); } configPOSTSLEEP_PROCESSING( xExpectedIdleTime ); ... __asm volatile( "cpsie i" );//enable interrupt

Some questions:

  • Why disable interrupt globally before goes to the "wfi" mode and only re-enable it after the "wfi" is woken up ?

  • Will this mean that the "wfi" can't be woken up by any other interrupt (other than systick)?

  • Currently, I have usb audio enabled. This means that the usb interrupt comes at 1 msec interval and I keep on missing the interrupt once I enable the tickless idle option. What's the best way to configure this tickless idle to work together with this kind of high frequency interrupt?

Thanks.


Tickless idle query

Posted by davedoors on April 22, 2014

Will this mean that the "wfi" can't be woken up by any other interrupt (other than systick)?

No. Please read the hardware manual, the comments in the code, and other posts in the forum to lean how the hardware works. For example, just yesterday http://sourceforge.net/p/freertos/discussion/382005/thread/aa2c2eeb/#4c96

I don't think tickless idle is appropriate if you have a 1ms interrupt because presumably the 1ms interrupt is either faster than or the same speed as the tick interrupt anyway so you cannot gain anything by turning the tick off.


Tickless idle query

Posted by l4na on April 23, 2014

Hi Dave, got it. Is there a way to enable tickless idle when the USB disconnected and disable it when the USB connected without changing the freertos core code? Or do you think this is recommended way of handling this use case? Thanks.


Tickless idle query

Posted by rtel on April 23, 2014

You can use the pre-sleep hook macro for that purpose. If the USB is connected then have the pre-sleep hook abort low power entry. If the USB is not connected then use the pre-sleep hook do nothing.

Search for configPRESLEEPPROCESSING on http://www.freertos.org/low-power-ARM-cortex-rtos.html

Regards.


[ 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