User`s manual
Watchdog Timer (WDT) Function Library 99
MXC-6300
outp(0x2E, regoffset);
outp(0x2F, data);
}
main(void)
{
unsigned int count;
/* print program title */
printf("-----------------MXC-6300 WDT Demo------------
-----\n");
printf("Init and config GPIO
ports<<<<<<<<<<<<<<<<<<<<<<<<<\n");
printf("----------------------------------------------
-----\n");
EnterConfig();
/* config WDT registers */
w_reg(0x07,0x08);
w_reg(0x30,0x01);
w_reg(0xF5,0x00);
w_reg(0xF7,0x00);
/* enable keyboard interrupt to reset WDT timeout
value */
w_reg(0xF7,r_reg(0xF7)|0x40);
/* set unit as second */
w_reg(0xF5,r_reg(0xF5)&0xF7);
/* enable reset when timeout */
w_reg(0xF5,r_reg(0xF5)|0x02);
PRELIMINARY