According to an aspect, there is provided a swing-boosted differential oscillator (500) and a method for trimming the oscillator. The oscillator comprises a switch (110′) for connecting a set of capacitors (C1, C2) alternately to power supply and ground (102′, 112′) based on a switching control (116A′, 116B′), two comparators (502, 504) configured to produce an output
signal of the oscillator (ck) and the switching control (116A′, 116B′) via a
multiplexer (508) by comparing a
voltage of the capacitors (C1, C2) at the inputs (VC1, VC2) of the comparators to a
threshold voltage (VBB), where the comparators comprising back gate bias input (FIG. 5: 804, FIG. 8: Vbb, 804) for controlling the
threshold voltage of the comparators, the
threshold voltage trimming the frequency of the output
signal of the oscillator.