A switched mode power supply, SMPS, comprising: a transformer with a first winding and a second winding, the first winding being connected to an input node and the second winding connected to an output node; an input switch connected to the first winding of the transformer; an output transistor connected to the second winding of the transformer; and a control circuit connected to the output transistor, the control circuit including: a regulator configured to regulate the voltage on a control terminal of the output transistor according to the voltage on a conduction terminal of the output transistor when the voltage on the conduction terminal reaches a reference voltage; the SMPS being characterized in that the control circuit further comprises a timer configured to start when the voltage on the conduction terminal of the output transistor reaches the reference voltage and to stop when the current through the output transistor reaches zero; and a sampling circuit connected to the timer, the sampling circuit being configured to sample a voltage difference between a target voltage and a voltage accumulated when the timer was active to produce a sampled voltage, the sampled voltage defining a new reference voltage if the accumulated voltage is not equal to the target voltage, where the accumulated voltage and the target voltage are received at an amplifier to produce the voltage difference, and wherein the control circuit is configured to operate in cycles by repeating the starting and stopping of the timer and the sampling of the voltage difference using the new reference voltage from the sampling circuit so that the reference voltage used in regulation of the voltage on the control terminal of the output transistor is adaptively adjusted in accordance with an operational characteristic of the output transistor. a transformer with a first winding and a second winding, the first winding being connected to an input node and the second winding connected to an output node; an input switch connected to the first winding of the transformer; an output transistor connected to the second winding of the transformer; and a control circuit connected to the output transistor, the control circuit including: a regulator configured to regulate the voltage on a control terminal of the output transistor according to the voltage on a conduction terminal of the output transistor when the voltage on the conduction terminal reaches a reference voltage; the SMPS being characterized in that the control circuit further comprises a timer configured to start when the voltage on the conduction terminal of the output transistor reaches the reference voltage and to stop when the current through the output transistor reaches zero; and a sampling circuit connected to the timer, the sampling circuit being configured to sample a voltage difference between a target voltage and a voltage accumulated when the timer was active to produce a sampled voltage, the sampled voltage defining a new reference voltage if the accumulated voltage is not equal to the target voltage, where the accumulated voltage and the target voltage are received at an amplifier to produce the voltage difference, and a regulator configured to regulate the voltage on a control terminal of the output transistor according to the voltage on a conduction terminal of the output transistor when the voltage on the conduction terminal reaches a reference voltage; the SMPS being characterized in that the control circuit further comprises a timer configured to start when the voltage on the conduction terminal of the output transistor reaches the reference voltage and to stop when the current through the output transistor reaches zero; and a sampling circuit connected to the timer, the sampling circuit being configured to sample a voltage difference between a target voltage and a voltage accumulated when the timer was active to produce a sampled voltage, the sampled voltage defining a new reference voltage if the accumulated voltage is not equal to the target voltage, where the accumulated voltage and the target voltage are received at an amplifier to produce the voltage difference, and wherein the control circuit is configured to operate in cycles by repeating the starting and stopping of the timer and the sampling of the voltage difference using the new reference voltage from the sampling circuit so that the reference voltage used in regulation of the voltage on the control terminal of the output transistor is adaptively adjusted in accordance with an operational characteristic of the output transistor.