12.3.7 Manual Tuning and Autotune
The output frequency of the OSCHF can be tuned either manually or automatically against an external oscillator.
Manual Tuning
The output frequency of the OSCHF can be tuned up and down by writing the Oscillator Tune (TUNE) bit field in the Frequency Tune (TUNE) register. The Automatic Oscillator Tune (AUTOTUNE) bit field in the CTRLA register must remain zero.
Autotune against External Crystal Oscillator
The OSCHF output frequency can be stabilized by automatic tuning against an external crystal oscillator. Enable Autotune by selecting the external oscillator in the Automatic Oscillator Tune (AUTOTUNE) bit field in the CTRLA register, which will lock the TUNE register and prevent manual tuning. The TUNE register is updated with the latest TUNE value when AUTOTUNE is disabled.
Refer also to the Electrical Characteristics for details.