diff options
author | Tomas Salfischberger <tomas@rockbox.org> | 2005-07-06 20:42:00 +0000 |
---|---|---|
committer | Tomas Salfischberger <tomas@rockbox.org> | 2005-07-06 20:42:00 +0000 |
commit | 3d25240f41be96ed58b2bf842a54cbe71a8f6316 (patch) | |
tree | 34f32d543f3117acb417d6b0c9f37c15b0bdf502 /firmware | |
parent | ffd207f4b03d3a38f9ab5793d8990cfcf9b0ae13 (diff) | |
download | rockbox-3d25240f41be96ed58b2bf842a54cbe71a8f6316.tar.gz rockbox-3d25240f41be96ed58b2bf842a54cbe71a8f6316.zip |
(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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/system.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ | |||
440 | snprintf(str,sizeof(str),"at %08x",pc); | 440 | snprintf(str,sizeof(str),"at %08x",pc); |
441 | lcd_puts(0,1,str); | 441 | lcd_puts(0,1,str); |
442 | lcd_update(); | 442 | lcd_update(); |
443 | |||
444 | /* set cpu frequency to 11mhz (to prevent overheating) */ | ||
445 | DCR = (DCR & ~0x01ff) | 1; | ||
446 | PLLCR = 0x00000000; | ||
443 | 447 | ||
444 | while (1) | 448 | while (1) |
445 | { | 449 | { |
450 | /* check for the ON button (and !hold) */ | ||
451 | if ((GPIO1_READ & 0x22) == 0) | ||
452 | system_reboot(); | ||
446 | } | 453 | } |
447 | } | 454 | } |
448 | 455 | ||