The application provides a fan control method and
system, comprising the following steps: S1, detecting the pull-up resistance of the ALERT pin and the FANFAIL pin during power-on and the
clock generation circuit, and obtaining the period and
duty cycle of the fan PWM
signal during power-on according to the resistance value; S2, waiting for the host computer to configure the FanDCYReg register, and being in the initial state if the FanDCYReg register is not configured; S3, after the host computer configures the FanDCYReg register, the
duty cycle of the fan PWM
signal is determined by the FanDCYReg register, and the period is determined by the PWMFreqReg register, and the state is the
normal state; S4, monitoring whether the
heartbeat line of the host computer is abnormal, and if the
heartbeat line is abnormal, the fan drive
control mode is switched to the takeover state, otherwise, the state is the
normal state; meanwhile, the
pulse counting circuit directly gives the RPM speed value of the fan, and the bit width is 16, and the division operation of the host computer is not needed. The application can provide the speed RPM of the
fan in real time, reduce the
software resource cost of the host computer, reduce the cable between the fan and the host computer, and reduce the
system cost.