A switching power supply circuit comprises a switching element for
controlling the on/off state of an input power supply according to a
drive pulse generated on the basis of a clock pulse having a prescribed
period. Breakdown of circuit elements due to current superposition is
effectively prevented by detecting current flowing through the switching
element and flywheel current, and comparing these detected results with a
first and second reference value, respectively. An overcurrent detection
circuit detects that the current flowing through a transistor for
controlling the on/off state of the input power source has reached a
first reference value, a flywheel current detection circuit detects
flywheel current, an overcurrent protection operation is performed for
turning off the transistor based on the detected output of the
overcurrent detection circuit, and the transistor is turned on during the
overcurrent protection operation at the timing of the clock pulse after
the flywheel current detected by the flywheel current detection circuit
has reached the second reference value.