summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/system.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/system.c b/firmware/system.c
index c01d127..1c384d2 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -440,9 +440,16 @@ void UIE (void) /* Unexpected Interrupt or Exception */
snprintf(str,sizeof(str),"at %08x",pc);
lcd_puts(0,1,str);
lcd_update();
+
+ /* set cpu frequency to 11mhz (to prevent overheating) */
+ DCR = (DCR & ~0x01ff) | 1;
+ PLLCR = 0x00000000;
while (1)
{
+ /* check for the ON button (and !hold) */
+ if ((GPIO1_READ & 0x22) == 0)
+ system_reboot();
}
}