diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-24 10:55:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-24 10:55:14 +0000 |
commit | 65206b08801fda02432e483f3ffba11f5a378e9f (patch) | |
tree | 6bb1505042612b0d74c6a04e827ed0b9b3f46b42 /ports/MSP430 | |
parent | 672fb83fa475643b6cbd4f3cdd0b799aa17e8b32 (diff) | |
download | ChibiOS-65206b08801fda02432e483f3ffba11f5a378e9f.tar.gz ChibiOS-65206b08801fda02432e483f3ffba11f5a378e9f.tar.bz2 ChibiOS-65206b08801fda02432e483f3ffba11f5a378e9f.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@671 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/MSP430')
-rw-r--r-- | ports/MSP430/chcore.h | 7 | ||||
-rw-r--r-- | ports/MSP430/port.dox | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index 1111118d7..9c42487f2 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -202,11 +202,16 @@ struct context { /**
* This port function is implemented as inlined code for performance reasons.
+ * @note The port code does not define a low poer mode, this macro has to be
+ * defined externally. The default implementation is a "nop", not a
+ * real low power mode.
*/
#if ENABLE_WFI_IDLE != 0
+#ifndef port_wait_for_interrupt
#define port_wait_for_interrupt() { \
- asm volatile ("wfi"); \
+ asm volatile ("nop"); \
}
+#endif
#else
#define port_wait_for_interrupt()
#endif
diff --git a/ports/MSP430/port.dox b/ports/MSP430/port.dox index 774098e3d..301dcec90 100644 --- a/ports/MSP430/port.dox +++ b/ports/MSP430/port.dox @@ -22,7 +22,8 @@ * order to formally change state because this may change).
* - <b>Serving Regular Interrupt</b>. Normal interrupt service code.
* - <b>Serving Fast Interrupt</b>. Not present in this architecture.
- * - <b>Serving Non-Maskable Interrupt</b>. Not present in this architecture.
+ * - <b>Serving Non-Maskable Interrupt</b>. The MSP430 has several non
+ * maskable interrupt sources that can be associated to this state.
* - <b>Halted</b>. Implemented as an infinite loop with interrupts disabled.
*
* @section MSP430_NOTES The MSP430 port notes
@@ -30,6 +31,12 @@ * enough stack space for interrupts in each thread stack. This can be done
* by modifying the @p INT_REQUIRED_STACK macro into
* <b>./ports/MSP430/chcore.h</b>.
+ * - The state of the hardware multiplier is not saved in the thread context,
+ * make sure to use it in <b>Suspended</b> state (interrupts masked).
+ * - The port code does not define the switch to a low power mode for the
+ * idle thread because the MSP430 has several low power modes. You can
+ * select the proper low power mode for you application by defining the
+ * macro @p port_wait_for_interrupt().
*
* @ingroup Ports
*/
|