summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/mbed
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-01-27 22:34:58 -0800
committerPixel <pixel@nobis-crew.org>2011-01-27 22:34:58 -0800
commit6c62aa73a40ab548d62ca804290a5c305f539fa9 (patch)
tree4777e9fd348288256aa7bcd2f9f6972b1cb13fdd /arch/arm/lpc17xx/mbed
parent27e7b701ceb1a96070b8eeadf85d3643a7adcc4e (diff)
Powering down the CPU in case of an exception.
Diffstat (limited to 'arch/arm/lpc17xx/mbed')
-rw-r--r--arch/arm/lpc17xx/mbed/BoardInit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/mbed/BoardInit.c b/arch/arm/lpc17xx/mbed/BoardInit.c
index bd31b35..968e723 100644
--- a/arch/arm/lpc17xx/mbed/BoardInit.c
+++ b/arch/arm/lpc17xx/mbed/BoardInit.c
@@ -1,4 +1,5 @@
#include "lpc17xx_nvic.h"
+#include "lpc17xx_clkpwr.h"
extern uintptr_t __cs3_interrupt_vector_mutable[];
@@ -13,4 +14,7 @@ void BoardShutdown() {
}
void BoardExceptionHandler(int code) {
+ volatile int i;
+ for (i = 0; i < 100000; i++);
+ CLKPWR_DeepPowerDown();
}