FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2010 Threads] Hazards of sleep modePosted by Michael on March 12, 2010 Hi, I wrote an an idle hook shown here void vApplicationIdleHook( void ) { asm("nop"); P1OUT &= ~0x01;//go to sleep lights off! LPM3;// LPM Mode - remove to make debug a little easier... asm("nop"); } That should cause the LED to turn off, and MSP430 to go to sleep when there is nothing to do. I turn the LED on during some tasks. I also made sure to modify the sleep mode bit in the SR upon exit of any interrupt that could possibly wake the MCU (with the exception of the scheduler tick isr in port. The macro in iar is __bic_SR_register_on_exit(LPM3_bits); // Exit Interrupt as active CPU However, it seems as though putting the MCU to sleep causes some irregular behavior. The led stays on always, although when i scope it, it will turn off for a couple instructions cycles when ever i wake the mcu via one of the interrupts (UART). If I comment out the LPM3 instruction, things go as planned. THe led stays off for most of the time and only comes on when a task is running. I am using a MSP4f305438 Any ideas?
RE: Hazards of sleep modePosted by Richard on March 13, 2010 Maybe not much help - but I seem to recall adding a wake from low power mode into the MPS430 tick handler code some time back (search http://www.freertos.org/History.txt to find the version this first went into). I can't remember which low power mode was used, but I know not all were suitable.
Regards.
RE: Hazards of sleep modePosted by Michael on March 14, 2010 Hey Richard, that thought occurred to me yesterday as well. I am using version 5.4 right now. I will give that a try and post my results when i have something.
Thanks, mike
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|