Advantech ITA-460 Series User Manual page 76

Fanless embedded industrial computer with 8th/9th gen intel core i processor for vehicle applications
Table of Contents

Advertisement

Table A.2: Watchdog (Warm Reset) Sample Code
void SetWD()
{
iopl(3);
DummyPort();
inb(0x299);
wait_IBF(0x29A);
outb(0x89, 0x29A);
wait_IBF(0x29A);
outb(0x5E, 0x299);
wait_IBF(0x29A);
outb(0x00, 0x299);
wait_IBF(0x29A);
outb(0x89, 0x29A);
wait_IBF(0x29A);
outb(0x5F, 0x299);
wait_IBF(0x29A);
outb(0x64, 0x299);
}
void StartWD()
{
iopl(3);
DummyPort();
outb(0x89, 0x29A);
wait_IBF(0x29A);
outb(0x57, 0x299);
wait_IBF(0x29A);
outb(0x04, 0x299);
wait_IBF(0x29A);
outb(0x28, 0x29A);
}
void StopWD()
{
iopl(3);
DummyPort();
outb(0x29, 0x29A);
wait_IBF(0x29A);
}
int main(int argc, char** argv) {
SetWD();
while(1)
{
StartWD();
usleep(5000000);
StopWD();
}
return 0;
}
ITA-460 User Manual
64

Advertisement

Table of Contents
loading

Table of Contents