A device for recovering or dampening vibratory energy from a mechanical resonator , comprising at least : - an electrical generator comprising at least one element for converting mechanical vibration energy of the mechanical resonator into electrical charges mechanically coupled to the mechanical resonator and configured to deliver a conversion signal, corresponding either to a sinusoidal voltage obtained between first and second output electrodes of the said at least one conversion element or to a sinusoidal current obtained on the first output electrode of the said at least one conversion element, of frequency equal to the vibration frequency of the mechanical resonator , the electrical generator being configured to periodically transfer, on command of a signal to be received on a control input , at least part of the electrical charges from one to the other of the first and second output electrodes of the said at least one conversion element; - a converter comprising an input electrically coupled to the first output electrode of the conversion element and configured to provide at an output a square wave signal of frequency equal to the frequency of the conversion signal. - a device for converting frequency variation into phase variation, comprising at least a first injection-locked oscillator , an injection input of which is electrically coupled to the output of the converter and configured such that its free oscillation frequency is substantially equal to the resonance frequency of the mechanical resonator , and configured to deliver on an output electrically coupled to the control input of the electrical generator, a periodic control signal of frequency equal to the frequency of the conversion signal and whose phase shift, relative to the conversion signal, is a function of the difference between the frequency of the conversion signal and the resonance frequency of the mechanical resonator . - an electrical generator comprising at least one element for converting mechanical vibration energy of the mechanical resonator into electrical charges mechanically coupled to the mechanical resonator and configured to deliver a conversion signal, corresponding either to a sinusoidal voltage obtained between first and second output electrodes of the said at least one conversion element or to a sinusoidal current obtained on the first output electrode of the said at least one conversion element, of frequency equal to the vibration frequency of the mechanical resonator , the electrical generator being configured to periodically transfer, on command of a signal to be received on a control input , at least part of the electrical charges from one to the other of the first and second output electrodes of the said at least one conversion element; - a converter comprising an input electrically coupled to the first output electrode of the conversion element and configured to provide at an output a square wave signal of frequency equal to the frequency of the conversion signal. - a device for converting frequency variation into phase variation, comprising at least a first injection-locked oscillator , an injection input of which is electrically coupled to the output of the converter and configured such that its free oscillation frequency is substantially equal to the resonance frequency of the mechanical resonator , and configured to deliver on an output electrically coupled to the control input of the electrical generator, a periodic control signal of frequency equal to the frequency of the conversion signal and whose phase shift, relative to the conversion signal, is a function of the difference between the frequency of the conversion signal and the resonance frequency of the mechanical resonator . <EOS>