Guide on how to configure Watch Dog on L08-i7-8550U fanless mini PC

i7 8550U Fanless embedded mini PC with GPIO 4G Function

#define SIO_CONFIG_INDEX 0x2E
#define SIO_CONFIG_DATA 0x2F

void WatchDogTimer(UINT16 TimerValue) // 1 < TimerValue < 65535 , Unit = Second { // Enter Configuration Mode. IoWrite8(SIO_CONFIG_INDEX, 0x87); IoWrite8(SIO_CONFIG_INDEX, 0x01); IoWrite8(SIO_CONFIG_INDEX, 0x55); IoWrite8(SIO_CONFIG_INDEX, 0x55); //=====================LDN 07====================================// IoWrite8(SIO_CONFIG_INDEX, 0x07); IoWrite8(SIO_CONFIG_DATA, 0x07); //=====================WDT====================================// IoWrite8(SIO_CONFIG_INDEX, 0x72); IoWrite8(SIO_CONFIG_DATA , 0xC0); //Enable WDT IoWrite8(SIO_CONFIG_INDEX, 0x74); IoWrite8(SIO_CONFIG_DATA , (UINT8)((TimerValue & 0xFF00)>>8 )); //MSB

IoWrite8(SIO_CONFIG_INDEX, 0x73);
IoWrite8(SIO_CONFIG_DATA , (UINT8)(TimerValue & 0x00FF)); //LSB
}

void DisableWdt()
{
// Enter Configuration Mode.
IoWrite8(SIO_CONFIG_INDEX, 0x87);
IoWrite8(SIO_CONFIG_INDEX, 0x01);
IoWrite8(SIO_CONFIG_INDEX, 0x55);
IoWrite8(SIO_CONFIG_INDEX, 0x55);

//=====================LDN 07====================================//
IoWrite8(SIO_CONFIG_INDEX, 0x07);
IoWrite8(SIO_CONFIG_DATA, 0x07);

IoWrite8(SIO_CONFIG_INDEX, 0x72);
IoWrite8(SIO_CONFIG_DATA , 0x00); //Disable WDT

IoWrite8(SIO_CONFIG_INDEX, 0x74);
IoWrite8(SIO_CONFIG_DATA , 0x00); //MSB

IoWrite8(SIO_CONFIG_INDEX, 0x73);
IoWrite8(SIO_CONFIG_DATA , 0x00); //LSB
}

Leave a Reply

Close Menu
×
×

Basket