A switch-mode converter controller and method utilizes a comparator for
receiving and comparing a sensed current and a peak current that is
determined by a product of a multiplying factor, that is greater than or
equal to two, and a target current. A finite state machine (FSM) is
configured to operate the switch-mode converter in a discontinuous
conduction mode (DCM). Responsive to the comparator, the FSM turns on the
switch and observes an on-time duration of the switch until the sensed
current reaches the peak current; calculates a switching period
responsive to the peak current and the observed on-time duration; and
varies the switching period responsive to the on-time duration and the
multiplying factor such that an average of the sensed current equals the
target current. The FSM can also be configured to alternatively operate
the switch-mode converter in a continuous conduction mode (CCM).