I was sawing some tips in the forum about the watchdog timer and I have some questions.
actually
I'm working with the HCS12 microcontroller and I need to use the
watchdog timer in order to do reset. I've configurated the COPCTL
register with 71 (COPCTL=71) the program
stay in a infinite for loop showing a caracter ascii in the
hyperterminal until the watchdog finish. The problem is: after the
watchdog timer has finished the program doesn't reset o may be yes, but
I can't see more caracters in the hyperterminal until I do a manual
reset. I've attached the program. I hope that you can help me. many
thanks.
This is the main function: void main(void) { /* put your own code here */ char msn[20]={"Hola"}; char msn1[5]={"."}; word cont1X; word cont2X; cont2X=0; while(cont2X<=5000) { cont2X++; cont1X=0; while(cont1X<=100) { asm BRN *; cont1X++; } } SCI0BD = 12; SCI0CR1 = 0x00; SCI0CR2 = 0x04; vfnSCITxMsg(msn); COPCTL=71; for(;;) { cont2X=0; while(cont2X<=5000) { cont2X++; cont1X=0; while(cont1X<=100) { asm BRN *; cont1X++; } } vfnSCITxMsg(msn1); } /* loop forever */ /* please make sure that you never leave main */ }