From 3d25240f41be96ed58b2bf842a54cbe71a8f6316 Mon Sep 17 00:00:00 2001 From: Tomas Salfischberger Date: Wed, 6 Jul 2005 20:42:00 +0000 Subject: [PATCH] (1) Set cpu to 11 Mhz when we "crash" to prevent overheating. (2) Bind the ON button to reboot when we are in the crashed state. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7044 a1c6a512-1295-4272-9138-f99709370657 --- firmware/system.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firmware/system.c b/firmware/system.c index c01d1270d7..1c384d2fe1 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(); } }