From 6c62aa73a40ab548d62ca804290a5c305f539fa9 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 27 Jan 2011 22:34:58 -0800 Subject: Powering down the CPU in case of an exception. --- arch/arm/lpc17xx/mbed/BoardInit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/lpc17xx/mbed/BoardInit.c') 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(); } -- cgit v1.2.3