Patent attributes
In an embodiment, a control circuit includes: an output terminal configured to be coupled to a control terminal of a transistor that is coupled to an inductor; a logic circuit configured to control the transistor using a first signal; a zero crossing detection circuit configured to generate a freewheeling signal indicative of a demagnetization of the inductor; a comparator having first and second inputs configured to receive a sense voltage indicative of a current flowing through the transistor and a reference voltage, respectively, and an output configured to cause the logic circuit to deassert the first signal; and a reference generator configured to generate the reference voltage and including: a current generator, a capacitor and a resistor coupled to the output of the reference generator, and a switch coupled in series with the resistor and configured to be controlled based on the first signal and the freewheeling signal.