An oscillator circuit. A gain stage element is coupled between both
terminals of the crystal. The gain stage element provides a
transconductance for oscillation according to a current provided by a
current source, and outputs a periodic signal through an output terminal.
A bias element is coupled between an input terminal and the output
terminal of the gain stage element to bias the gain stage element. A
first capacitor is coupled to the input terminal of the gain stage
element. A second capacitor is coupled to the output terminal of the gain
stage element. A controller detects the periodic signal, and adjusts the
current when the periodic signal is obtained.