outportb(0x2F, 0x08);
//Enable WDT
outportb(0x2E, 0x30);
outportb(0x2F, 0x01);
//Set unit: seconds (0x00) or minutes (0x08)
outportb(0x2E, 0x5F);
outportb(0x2F, 0x00); //In seconds
//Set timeout value (1-255)
outportb(0x2E, 0x5F);
outportb(0x2F, 30); //30 seconds
//The application needs to periodically execute the following statements to reset the timer
outportb(0x2E, 0x5F);
outportb(0x2F, 30); //Reload the count value
If the timeout is not reset, the system will automatically reset. Pay attention to regularly "feeding the dog" at the driver or application layer.
POST code and troubleshooting
When BIOS starts, it outputs a POST code (which can be viewed through the PCI diagnostic card). Common code meanings include:
CFh: Testing CMOS Read and Write
C1h: Check the memory. If it is stuck here, it is mostly due to poor memory contact or incompatibility
01h~05h: Early initialization, if it crashes, it may cause hardware failure on the motherboard
2Ah~2Dh: Call video BIOS, no display possible graphics card or PCIe slot issue
7Fh: Ready to start, if stopped here, it is mostly because the motherboard cannot find the boot device
FFh: Attempt INT 19h boot, normal startup completed
If the system does not start, first check if the CPU fan is running, clear the CMOS (CLRTC), and then minimize the configuration (leaving only the CPU, one memory, and integrated display) to gradually troubleshoot.
Common Problems and Responses
Possible causes and countermeasures of the problem
Check if the CPU is properly installed and if the memory is securely plugged in when there is no display when powered on; Clear CMOS; Confirm that the monitor is connected to the integrated VGA port (if no dedicated monitor is installed)
Repeatedly restarting after startup may result in insufficient power supply or CPU overheating; Check if the CPU fan is stopped; Attempt to load Fail Safe Defaults
Hard drive cannot recognize SATA mode setting error (such as AHCI but without driver installed); Replace the data cable or SATA port; Check the hard drive power cord
Check if the USB keyboard/mouse function is enabled in the BIOS if it is invalid; Try using a PS/2 adapter cable (via USB-PS/2 cable)
Check if the COM port address/IRQ is correct when there is no output from the serial port; Confirm that the peripheral device wiring and baud rate are consistent
Audio silence confirmation: HD Audio CODEC enabled; Check if the front audio jumper (AAFP) is connected correctly; Restart after driver installation
Check if the application program regularly resets the WDT when the watchdog accidentally resets; The timeout value is too short; Confirm that the Super I/O configuration is correct
PCIe x16 graphics card recognition exception: Initialize Display First is set to PEG in BIOS; Confirm that the graphics card has sufficient power supply; Check if the PCIe slot is loose
