Intel IB868 user manual Watchdog Timer Configuration, Sample Code

Page 57

APPENDIX

C. Watchdog Timer Configuration

The WDT is used to generate a variety of output signals after a user programmable count. The WDT is suitable for use in the prevention of system lock-up, such as when software becomes trapped in a deadlock. Under these sorts of circumstances, the timer will count to zero and the selected outputs will be driven. Under normal circumstance, the user will restart the WDT at regular intervals before the timer counts to zero.

SAMPLE CODE:

//===========================================================================

//

//THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY

//KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE

//IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR

//PURPOSE.

//

//=========================================================================== #include <stdio.h>

#include <stdlib.h> #include "W627EHF.H" //=========================================================================== int main (int argc, char *argv[]);

void copyright(void); void EnableWDT(int); void DisableWDT(void); //=========================================================================== int main (int argc, char *argv[])

{

unsigned char bBuf; unsigned char bTime; char **endptr;

copyright();

if (argc != 2)

{

printf(" Parameter incorrect!!\n"); return 1;

}

if (Init_W627EHF() == 0)

{

printf(" Winbond 83627HF is not detected, program abort.\n"); return 1;

}

bTime = strtol (argv[1], endptr, 10);

printf("System will reset after %d seconds\n", bTime);

EnableWDT(bTime);

return 0;

}

//===========================================================================

IB868 User’s Manual

53

Image 57
Contents Version USER’S ManualAcknowledgments Table of Contents This page is intentionally left blank Product Description IntroductionChecklist CPU FSB SpecificationsBoard Dimensions Installations Installing the CPU Installing and Removing Memory Modules Installing the MemorySetting the Jumpers Jumper Locations on IB868 JP3 Clear Cmos Contents JP2 Panel Voltage SettingJP5 VGA Signal Select JP6 CPU Front Side Bus Frequency SettingConnectors on IB868 J1 ATX 12V/+12V Power Connector J2 System Function Connector FDD1 Floppy Drive Connector IDE1, IDE2 Eide ConnectorsFAN1 CPU Fan Power Connector CN1, CN2 Serial ATA Sata ConnectorsFAN2, FAN3 System Fan Power Connector J1 ATX 12V/+12V Power ConnectorATX Power on Switch Pins 7 J2 System Function ConnectorJ4, J5 Lvds Connectors 2nd channel, 1st channel Reset Switch Pins 9J6 Panel Inverter Power Connector J7, J8 , J9 USB ConnectorsJ10, J12 COM1 and COM2 Serial Ports Connector J11 Parallel Port Connector J13 Digital input / output ConnectorJ14 IrDA Connector J16, J17 External PS/2 Mouse and Keyboard Connector J15 Wake On LAN ConnectorJ18 CD-In Audio Connector J19 PS/2 Keyboard and Mouse ConnectorJ21 Gigabit LAN RJ45 Connector J20 Primary RJ45 ConnectorJ22 External Audio Connector J23 VGA CRT ConnectorBios Setup Bios Setup Bios IntroductionPhoenix AwardBIOS Cmos Setup Utility Date Standard Cmos SetupTime IDE Channel Master/SlaveDrive a / Drive B Halt On VideoCPU Feature Advanced Bios FeaturesHard Disk Boot Priority Virus WarningFirst/Second/Third Boot Device Quick Power On Self TestBoot Other Device Boot Up Floppy SeekApic Mode Typematic Delay MsecSecurity Option MPS Version Control for OSDram RAS# to CAS# Delay Advanced Chipset FeaturesDram Timing Selectable CAS Latency TimeSystem Bios Cacheable Precharge Delay tRASVideo Bios Cacheable On-Chip VGA SettingPanel Number Panel ScalingOnboard PCI-E LAN LAN PXE Option ROMOnChip IDE Device Integrated PeripheralsIDE DMA Transfer Access IDE HDD Block ModeOn-chip Primary PCI IDE Enabled OnChip Primary/Secondary PCI IDEPower on Function On-Chip Serial ATA SettingKB Power on Password Hot Key Power onUart Mode Select Power Management SetupOnboard Serial Port Pwron After PWR-FailPower Management RUN Vgabios if S3 ResumeSuspend Mode HDD Power DownResume by Alarm Power On by RingReload Global Timer Events Soft-Off by PwrbtnPNP/PCI Configurations PC Health Status Frequency/Voltage Control Auto Detect PCI ClkSpread Spectrum Modulated Load Optimized Defaults Load Fail-Safe DefaultsSet Supervisor Password Save & Exit SetupDrivers Installation Click IntelR Chipset Software Installation Utility Intel Chipset Software Installation UtilityDrivers Installation Click IntelR 915GMChipset Family Graphics Driver VGA Drivers InstallationImportant Note Click Realtek AC97 Codec Audio Driver AC97 Codec Audio Driver InstallationClick Install Base Software to continue LAN Drivers InstallationDrivers Installation O Port Address Map AppendixLevel Function Interrupt Request Lines IRQSample Code Watchdog Timer ConfigurationAppendix OutportbW627EHFINDEXPORT, W627EHFLOCK W627EHFLOCK