A microcontroller unit, MCU, or a microprocessor unit, MPU, comprising a clock circuit, the clock circuit comprising:
- an amplifier having a first input, a second input, and an output;
- a voltage controlled oscillator having an input coupled to the output of the amplifier and an output for outputting an output clock signal of the clock circuit;
- a reference branch comprising:
- an input for receiving an input reference clock signal having a frequency fin,
- a first switch coupled to the input via an inverter, for control of the first switch by the input reference clock signal,
- a second switch coupled to the input, for control of the second switch by the input reference clock signal,
- a variable capacitor having a first terminal coupled to a reference potential and a second terminal coupled to a first terminal of the first switch,
- a variable resistor having a first terminal coupled to a second terminal of the first switch,
- a supply voltage node coupled to a second terminal of the variable resistor, and
- an output node coupled between the first terminal of the variable resistor and the second terminal of the first switch to output a reference voltage of the reference branch to the first input of the amplifier,
- wherein the second switch has a first terminal coupled to the first terminal of the variable capacitor and a second terminal coupled to a node between the second terminal of the variable capacitor and the first terminal of the first switch;
- and
- a feedback branch comprising:
- a feedback input coupled to the output of the voltage controlled oscillator for receiving the output clock signal of the clock circuit,
- a first switch coupled to the feedback input via an inverter, for control of the first switch by the output clock signal of the clock circuit,
- a second switch coupled to the feedback input, for control of the second switch by the output clock signal of the clock circuit,
- a variable capacitor having a first terminal coupled to the reference potential and a second terminal coupled to a first terminal of the first switch of the feedback branch,
- a variable resistor having a first terminal coupled to a second terminal of the first switch of the feedback branch,
- a supply voltage node coupled to a second terminal of the variable resistor of the feedback branch, and
- an output node coupled between the first terminal of the variable resistor of the feedback branch and the second terminal of the first switch of the feedback branch to output a feedback voltage of the feedback branch to the second input of the amplifier,
- wherein the second switch of the feedback branch has a first terminal coupled to the first terminal of the variable capacitor of the feedback branch and a second terminal coupled to a node between the second terminal of the variable capacitor of the feedback branch and the first terminal of the first switch of the feedback branch.