A circuit, comprising: a stability-controlling element; and an integrated circuit coupled to the stability-controlling element, the integrated circuit including a closed-loop system that produces a signal and a detector for detecting oscillation of the signal, characterised in that the detector includes: a band-pass filter having an input terminal for receiving the signal, and having an output terminal; a voltage source for producing a threshold voltage; a voltage comparator having a first input terminal coupled to the output terminal of the band-pass filter, and having a second input terminal coupled to the voltage source; a low-pass filter having an input terminal coupled to the output terminal of the voltage comparator, and having an output terminal; a comparator circuit with hysteresis having an input terminal coupled to the output terminal of the low-pass filter, and having an output terminal, wherein the output terminal of the comparator circuit with hysteresis produces a flag when the signal oscillates provided that: a frequency of oscillation of the signal is within a band-pass of the band-pass filter, an amplitude of oscillation of the signal is greater than the threshold voltage, and a duration of oscillation of the signal is longer than a time constant of the low-pass filter. a stability-controlling element; and an integrated circuit coupled to the stability-controlling element, the integrated circuit including a closed-loop system that produces a signal and a detector for detecting oscillation of the signal, characterised in that the detector includes: a band-pass filter having an input terminal for receiving the signal, and having an output terminal; a voltage source for producing a threshold voltage; a voltage comparator having a first input terminal coupled to the output terminal of the band-pass filter, and having a second input terminal coupled to the voltage source; a low-pass filter having an input terminal coupled to the output terminal of the voltage comparator, and having an output terminal; a comparator circuit with hysteresis having an input terminal coupled to the output terminal of the low-pass filter, and having an output terminal, wherein the output terminal of the comparator circuit with hysteresis produces a flag when the signal oscillates provided that: a frequency of oscillation of the signal is within a band-pass of the band-pass filter, an amplitude of oscillation of the signal is greater than the threshold voltage, and a duration of oscillation of the signal is longer than a time constant of the low-pass filter. a band-pass filter having an input terminal for receiving the signal, and having an output terminal; a voltage source for producing a threshold voltage; a voltage comparator having a first input terminal coupled to the output terminal of the band-pass filter, and having a second input terminal coupled to the voltage source; a low-pass filter having an input terminal coupled to the output terminal of the voltage comparator, and having an output terminal; a comparator circuit with hysteresis having an input terminal coupled to the output terminal of the low-pass filter, and having an output terminal, wherein the output terminal of the comparator circuit with hysteresis produces a flag when the signal oscillates provided that: a frequency of oscillation of the signal is within a band-pass of the band-pass filter, an amplitude of oscillation of the signal is greater than the threshold voltage, and a duration of oscillation of the signal is longer than a time constant of the low-pass filter. a frequency of oscillation of the signal is within a band-pass of the band-pass filter, an amplitude of oscillation of the signal is greater than the threshold voltage, and a duration of oscillation of the signal is longer than a time constant of the low-pass filter.