1 #include <system_def.h>
3 #include <hal_machperiph.h>
7 // set PLL multiplier & divisor.
8 // values computed from config.h
9 PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL;
13 PLLFEED = 0xAA; // Make it happen. These two updates
14 PLLFEED = 0x55; // MUST occur in sequence.
17 while (!(PLLSTAT & PLLSTAT_LOCK))
20 // enable & connect PLL
21 PLLCON = PLLCON_PLLE | PLLCON_PLLC;
22 PLLFEED = 0xAA; // Make it happen. These two updates
23 PLLFEED = 0x55; // MUST occur in sequence.
30 PLLFEED = 0xAA; // Make it happen. These two updates
31 PLLFEED = 0x55; // MUST occur in sequence.
34 void lpc_watchdog_feed()
44 void lpc_watchdog_init(int on,int timeout_ms)
47 WDTC = PCLK/(1000/timeout_ms);
48 WDMOD = 0x03; /* Enable watchdog timer and reset */