diff options
author | Pixel <pixel@nobis-crew.org> | 2011-01-27 22:34:58 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-01-27 22:34:58 -0800 |
commit | 6c62aa73a40ab548d62ca804290a5c305f539fa9 (patch) | |
tree | 4777e9fd348288256aa7bcd2f9f6972b1cb13fdd /arch/arm/lpc17xx/mbed/BoardInit.c | |
parent | 27e7b701ceb1a96070b8eeadf85d3643a7adcc4e (diff) |
Powering down the CPU in case of an exception.
Diffstat (limited to 'arch/arm/lpc17xx/mbed/BoardInit.c')
-rw-r--r-- | arch/arm/lpc17xx/mbed/BoardInit.c | 4 |
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(); } |