Intel MI910F user manual Watchdog Timer Configuration, Sample Code

Page 63

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;

}

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

MI910 User’s Manual

59

Image 63
Contents Version Intel CoreTM 2 Duo Celeron GM965Acknowledgments Table of Contents MI910 Mini ITX Motherboard Product Description IntroductionChecklist CPU FSB MI910 SpecificationsBoard Dimensions Installations Installing the CPU Lock Installing the MemorySetting the Jumpers Jumper Locations on MI910 JP8 CompactFlash Slave/Master Selection JP5 LCD Panel Power SelectionJBAT1 Clear Cmos Setting JP9 PCI/PCIE Riser Card SelectionConnectors on MI910 Connector Locations on MI910 MI910 Solder Side CN2, CN3 COM1 and VGA Connector CN1 PS/2 Keyboard and PS/2 Mouse ConnectorsFAN2 CPU Fan Power Connector FDD1 Floppy Drive Connector IDE1 IDE ConnectorJ1 Fpanel System Function Connector ATX1 ATX Power Supply ConnectorPower LED Pins 11 Pin # Signal Name COM2 FUSB1 USB0/USB1 ConnectorJ2 COM2 Serial Port J3, J4 Lvds Connectors 1st channel, 2nd channelJ5 LCD Backlight Connector J7 Mini PCI Connector CN8, CN9 Sata ConnectorsJ8 Digital I/O J10 SPI Flash Connector factory use onlyJ11 1394 Connector J12 Front Audio ConnectorSDVOCCLK+ Sdvocclk J14 IrDA ConnectorJP4 Headers and Connectors on MI910 Daughter CardsRED ID391 J2 DVI Connector This page is intentionally left blank Bios Setup Bios Setup Bios IntroductionPhoenix AwardBIOS Cmos Setup Utility Date Standard Cmos SetupTime IDE Channel Master/SlaveDrive a / Drive B Halt On VideoVirus Warning Advanced Bios FeaturesCPU Feature Hard Disk Boot PriorityBoot Up Floppy Seek Quick Power On Self TestFirst/Second/Third Boot Device Boot Other DeviceMPS Version Control for OS Typematic Delay MsecApic Mode Security OptionAdvanced Chipset Features System Bios CacheableMemory Hole At 15M-16M On-Chip VGA Setting Panel ScalingPanel Number OnChip IDE Device Integrated PeripheralsIDE Primary/Secondary Master/Slave PIO IDE HDD Block ModeOn-chip Primary PCI IDE Enabled On-chip Primary/Secondary PCI IDEHot Key Power on On-Chip Serial ATA SettingPower on Function KB Power on PasswordUSB 1.0 Controller Uart Mode SelectOnboard Serial Port Pwron After PWR-FailAcpi Function Power Management SetupRUN Vgabios if S3 Resume Power ManagementVideo Off Method Suspend ModeHDD Power Down Power On by RingReload Global Timer Events Resume by AlarmPNP/PCI Configurations 1st 2st Smart Fan Temperature CPU Warning TemperatureTemperatures/Voltages Shutdown TemperatureFrequency/Voltage Control Auto Detect PCI ClkSpread Spectrum Modulated Save & Exit Setup Load Fail-Safe DefaultsLoad Optimized Defaults Set Supervisor PasswordDrivers Installation Click IntelR Chipset Software Installation Utility Intel Chipset Software Installation UtilityDrivers Installation Click IntelR GM965Chipset 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 InstallationDriver Installation O Port Address Map AppendixLevel Function Interrupt Request Lines IRQSample Code Watchdog Timer ConfigurationAppendix OutportbW627EHFINDEXPORT, W627EHFLOCK W627EHFLOCK