A comparing circuit and a control loop are used to maintain the peak level
of current flowing through an inductor of a flyback converter. An
inductor switch control signal controls an inductor switch through which
the inductor current flows. The inductor current increases at a ramp-up
rate during a ramp time and stops increasing at the end of the ramp time.
The comparing circuit generates a timing signal that indicates a target
time at which the inductor current would reach a predetermined current
limit if the inductor current continued to increase at the ramp-up rate.
The control loop then receives the timing signal and compares the target
time to the end of the ramp time. The pulse width of the inductor switch
control signal is increased when the target time occurs after the end of
the ramp time. Adjusting the pulse width controls the peak of the
inductor current.