mirror of
https://github.com/dougg3/mac-rom-simm-programmer.git
synced 2024-12-01 19:50:18 +00:00
Disable watchdog timer when the firmware boots
If it gets this far, the firmware is at least sort of running, so the watchdog has served its purpose of resetting to the bootloader if there's invalid firmware flashed to the device.
This commit is contained in:
parent
4de119c880
commit
71164460f3
@ -68,6 +68,9 @@ void Board_Init(void)
|
|||||||
|
|
||||||
// Start the timer, prescaler = 48, so 1 MHz
|
// Start the timer, prescaler = 48, so 1 MHz
|
||||||
TIMER0->CTL = TIMER_CTL_CNTEN_Msk | (3UL << TIMER_CTL_OPMODE_Pos) | 47;
|
TIMER0->CTL = TIMER_CTL_CNTEN_Msk | (3UL << TIMER_CTL_OPMODE_Pos) | 47;
|
||||||
|
|
||||||
|
// Disable WDT now; the main firmware is booted.
|
||||||
|
WDT->CTL = (6 << WDT_CTL_TOUTSEL_Pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Determines if a brownout was detected at startup
|
/** Determines if a brownout was detected at startup
|
||||||
|
Loading…
Reference in New Issue
Block a user