summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/system.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/system.c b/firmware/system.c
index 32ea3c0c03..d6b48247ea 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -451,13 +451,21 @@ void UIE (void) /* Unexpected Interrupt or Exception */
451 451
452 /* set cpu frequency to 11mhz (to prevent overheating) */ 452 /* set cpu frequency to 11mhz (to prevent overheating) */
453 DCR = (DCR & ~0x01ff) | 1; 453 DCR = (DCR & ~0x01ff) | 1;
454 PLLCR = 0x00000000; 454 PLLCR = 0x10800000;
455 455
456 while (1) 456 while (1)
457 { 457 {
458 /* check for the ON button (and !hold) */ 458 /* check for the ON button (and !hold) */
459 if ((GPIO1_READ & 0x22) == 0) 459 if ((GPIO1_READ & 0x22) == 0)
460 system_reboot(); 460 SYPCR = 0xc0;
461 /* Start watchdog timer with 512 cycles timeout. Don't service it. */
462
463 /* We need a reset method that works in all cases. Calling system_reboot()
464 doesn't work when we're called from the debug interrupt, because then
465 the CPU is in emulator mode and the only ways leaving it are exexcuting
466 an rte instruction or performing a reset. Even disabling the breakpoint
467 logic and performing special rte magic doesn't make system_reboot()
468 reliable. The system restarts, but boot often fails with ata error -42. */
461 } 469 }
462} 470}
463 471