diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-02-27 21:27:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-02-27 21:27:20 +0000 |
commit | 75c03c950d2211049c93c1469e014d03f0ee4bc3 (patch) | |
tree | c15b2bfbaf3e434818a98b3b25b4f031ca4eeab0 /nuttx/arch/arm/src/common | |
parent | 0582f98ab57d15e55717a22ba4bba6d961c3395b (diff) | |
download | px4-nuttx-75c03c950d2211049c93c1469e014d03f0ee4bc3.tar.gz px4-nuttx-75c03c950d2211049c93c1469e014d03f0ee4bc3.tar.bz2 px4-nuttx-75c03c950d2211049c93c1469e014d03f0ee4bc3.zip |
Special IDLE for STM32 will execut WFI to sleep until an interrupt occurs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3324 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/common')
-rw-r--r-- | nuttx/arch/arm/src/common/up_idle.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/common/up_idle.c b/nuttx/arch/arm/src/common/up_idle.c index ba6affb0e..62557c3a8 100644 --- a/nuttx/arch/arm/src/common/up_idle.c +++ b/nuttx/arch/arm/src/common/up_idle.c @@ -62,32 +62,30 @@ * Name: up_idle * * Description: - * up_idle() is the logic that will be executed when their - * is no other ready-to-run task. This is processor idle - * time and will continue until some interrupt occurs to - * cause a context switch from the idle task. + * up_idle() is the logic that will be executed when their is no other + * ready-to-run task. This is processor idle time and will continue until + * some interrupt occurs to cause a context switch from the idle task. * - * Processing in this state may be processor-specific. e.g., - * this is where power management operations might be - * performed. + * Processing in this state may be processor-specific. e.g., this is where + * power management operations might be performed. * ****************************************************************************/ void up_idle(void) { #if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS) - /* If the system is idle and there are no timer interrupts, - * then process "fake" timer interrupts. Hopefully, something - * will wake up. + /* If the system is idle and there are no timer interrupts, then process + * "fake" timer interrupts. Hopefully, something will wake up. */ sched_process_timer(); -#endif +#else /* Sleep until an interrupt occurs to save power */ #if 0 asm("WFI"); /* For example */ #endif +#endif } |