Page 1 of 1

Nuvoton 8051 watch dog issue.

Posted: 27 Feb 2018, 16:00
by yoonts
My mcu is N76E003.
I fused config bit for watch dog enable.
I programmed the below.

if((WDCON|~SET_BIT3)==0xFF) {
clr_WDTRF;
}
if((WDCON|~SET_BIT5)==0xFF) {
clr_WDTF;
}
clr_WDTEN;
set_WDCLR; //Clear WDT timer
// while((WDCON|~SET_BIT6)==0xFF); //confirm WDT clear is ok before into power down mode
if((BODCON0|~SET_BIT1)==0xFF) {
clr_BORF;
}
//wdt_init();
//set_WDTR;
uart_puts("\r\nProgram Start!\r\n");
while(1){
delay_ms(100);
}

Why my program keeps reset by watch dog?