diff options
author | richardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2008-10-19 18:52:04 +0000 |
---|---|---|
committer | richardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2008-10-19 18:52:04 +0000 |
commit | 40b743c5978732c1827cc6c2148ee00ba85a2990 (patch) | |
tree | 59d0c8ddce791155fc57136b44a7a02450cf65b1 | |
parent | 79e0b787043805c39d9339255866d926a44f291d (diff) | |
download | freertos-40b743c5978732c1827cc6c2148ee00ba85a2990.tar.gz freertos-40b743c5978732c1827cc6c2148ee00ba85a2990.tar.bz2 freertos-40b743c5978732c1827cc6c2148ee00ba85a2990.tar.xz |
Update to allow low power mode to be used with the RTOS.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@506 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r-- | Source/portable/GCC/MSP430F449/port.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/portable/GCC/MSP430F449/port.c b/Source/portable/GCC/MSP430F449/port.c index b07867df..4c92e9fd 100644 --- a/Source/portable/GCC/MSP430F449/port.c +++ b/Source/portable/GCC/MSP430F449/port.c @@ -123,6 +123,9 @@ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING; * loaded from the task control block. Next the value for usCriticalNesting
* used by the task is retrieved from the stack - followed by the value of all
* the general purpose msp430 registers.
+ *
+ * The bic instruction ensures there are no low power bits set in the status
+ * register that is about to be popped from the stack.
*/
#define portRESTORE_CONTEXT() \
asm volatile ( "mov.w pxCurrentTCB, r12 \n\t" \
@@ -141,6 +144,7 @@ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING; "pop r6 \n\t" \
"pop r5 \n\t" \
"pop r4 \n\t" \
+ "bic #(0xf0),0(r1) \n\t" \
"reti \n\t" \
);
/*-----------------------------------------------------------*/
|