A control system for a switching power supply shifts the phase of a PWM
signal in response to a change in operating conditions. The phase may be
shifted by resetting an oscillator that controls the PWM signal. Phase
shift logic may include a sample-hold circuit that holds the value of an
error signal when the PWM signal switches state. The held error signal
may be compared to the real-time error signal, preferably with a user
configurable offset. The output of the phase shift logic may be used to
reset the oscillator.