]> git.sur5r.net Git - freertos/commitdiff
Update to allow low power mode to be used with the RTOS.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 19 Oct 2008 18:52:04 +0000 (18:52 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 19 Oct 2008 18:52:04 +0000 (18:52 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@506 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/GCC/MSP430F449/port.c

index b07867df72fdc4719c612eea5b449f2eb596b6f8..4c92e9fddbe2df97fad2297aa21a983647acd383 100644 (file)
@@ -123,6 +123,9 @@ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING;
  * loaded from the task control block.  Next the value for usCriticalNesting\r
  * used by the task is retrieved from the stack - followed by the value of all\r
  * the general purpose msp430 registers.\r
+ *\r
+ * The bic instruction ensures there are no low power bits set in the status\r
+ * register that is about to be popped from the stack.\r
  */\r
 #define portRESTORE_CONTEXT()                                                          \\r
        asm volatile (  "mov.w  pxCurrentTCB, r12               \n\t"   \\r
@@ -141,6 +144,7 @@ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING;
                                        "pop    r6                                              \n\t"   \\r
                                        "pop    r5                                              \n\t"   \\r
                                        "pop    r4                                              \n\t"   \\r
+                                       "bic    #(0xf0),0(r1)                   \n\t"   \\r
                                        "reti                                                   \n\t"   \\r
                                );\r
 /*-----------------------------------------------------------*/\r