Vortex86DX-MSJK CE 6.0 Jump Start - Getting Started Guide
Vortex86DX-MSJK Windows Embedded CE 6.0 R3 Jump Start Rev 2.0
Page 136
printf("Press any key to stop trigger timer.\n");
while(!kbhit())
{
outp(0x22,0x13); // Unlock register
outp(0x23,0xc5);
outp(0x22,0x3c);
unsigned char c = inp(0x23);
outp(0x22,0x3c);
outp(0x23,c|0x40);
outp(0x22,0x13); // Lock register
outp(0x23,0x00);
}
printf("System will reboot after 5 seconds.\n");
}
Using WDT1
WDT1 does not use index and data port to access the watchdog timer registers. It uses I/O port 68H
~ 6DH. WDT1 can be configured to trigger system reset, NMI or IRQ.
Sample codes to configure and use WDT1:
void main(void)
{
unsigned char c;
unsigned long lTime;
// Configure WDT1 to trigger in 5 seconds
lTime = 0x20L * 5000L;
outp(0x6c, (lTime >> 16) & 0xff);
outp(0x6b, (lTime >> 8) & 0xff);
outp(0x6a, (lTime >> 0) & 0xff);
// Configure WDT1 to reset system when it trigger
outp(0x69, 0xd0);
// outp(0x69, 0x10) to trigger IRQ3
// outp(0x69, 0x20) to trigger IRQ4
// outp(0x69, 0x30) to trigger IRQ5
// outp(0x69, 0x40) to trigger IRQ6
// outp(0x69, 0x50) to trigger IRQ7
// outp(0x69, 0x60) to trigger IRQ9
// outp(0x69, 0x70) to trigger IRQ10
// outp(0x69, 0x90) to trigger IRQ12
// outp(0x69, 0xa0) to trigger IRQ14
// outp(0x69, 0xb0) to trigger IRQ15
// outp(0x69, 0xc0) to trigger NMI
// outp(0x69, 0xd0) to trigger system reset
// Enable WDT1 watchdog timer
c = inp(0x68);
c |= 0x40;
outp(0x68, c);
printf("Press any key to stop trigger timer.\n");
while(!kbhit())
outp(0x67, 0x00);
printf("System will reboot after 5 seconds.\n");
}