aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-08-01 09:24:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-08-01 09:24:16 +0000
commit8e2d082b7bb0c2b9d938f7bb32dc9425767b645d (patch)
tree7473c6ca22f4ec9a6206ad7ebddc9e6ee231eb55
parentda290782934b7038dfccd5f76b2b75a792e7304f (diff)
downloadChibiOS-8e2d082b7bb0c2b9d938f7bb32dc9425767b645d.tar.gz
ChibiOS-8e2d082b7bb0c2b9d938f7bb32dc9425767b645d.tar.bz2
ChibiOS-8e2d082b7bb0c2b9d938f7bb32dc9425767b645d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@380 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--ports/ARMCM3/chcore.c4
-rw-r--r--ports/ARMCM3/chcore.h1
-rw-r--r--readme.txt5
3 files changed, 9 insertions, 1 deletions
diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c
index 199c71fd9..b9c7ce39a 100644
--- a/ports/ARMCM3/chcore.c
+++ b/ports/ARMCM3/chcore.c
@@ -27,7 +27,9 @@ __attribute__((weak))
void _IdleThread(void *p) {
while (TRUE) {
-// asm volatile ("wfi");
+#if ENABLE_WFI_IDLE != 0
+ asm volatile ("wfi");
+#endif
}
}
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h
index 17b9e5b0b..1e451dfc7 100644
--- a/ports/ARMCM3/chcore.h
+++ b/ports/ARMCM3/chcore.h
@@ -29,6 +29,7 @@ typedef void *regarm;
*/
#define BASEPRI_USER 0 /* User level BASEPRI, 0 = disabled. */
#define BASEPRI_KERNEL 0x10 /* BASEPRI level within kernel lock. */
+#define ENABLE_WFI_IDLE 0 /* Enables the use of the WFI ins. */
/*
* Interrupt saved context, empty in this architecture.
diff --git a/readme.txt b/readme.txt
index dc89f5fe6..d63d462f8 100644
--- a/readme.txt
+++ b/readme.txt
@@ -91,6 +91,11 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
performance.
- Added a test_terminate_threads() function to the test framework.
- Made the Cortex-M3 port preemption code more readable.
+- Added a ENABLE_WFI_IDLE option to the chcore.h file in the Cortex-M3 port,
+ setting this option to 1 enables the kernel to enter a low power mode when
+ executing the idle thread. Be careful however, this option can be not
+ compatible with some JTAB probes, it is better to enable it only on final
+ builds and not when debugging.
*** 0.6.8 ***
- FIX: Fixed a bug in the priority inheritance mechanism, the bug was only a