From 7a7d761839a8380492a7314210aa0772c7b575b8 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 19 Oct 2008 18:52:04 +0000 Subject: [PATCH] Update to allow low power mode to be used with the RTOS. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@506 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/GCC/MSP430F449/port.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/portable/GCC/MSP430F449/port.c b/Source/portable/GCC/MSP430F449/port.c index b07867df7..4c92e9fdd 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" \ ); /*-----------------------------------------------------------*/ -- 2.39.5