12.5.8 Internal High-Frequency Oscillator Control A

Name: OSCHFCTRLA
Offset: 0x08
Reset: 0x0C
Property: Configuration Change Protection

Bit 76543210 
 RUNSTDBYALGSELFRQSEL[3:0]AUTOTUNE[1:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00001100 

Bit 7 – RUNSTDBY Run Standby

This bit controls whether the internal high-frequency oscillator (OSCHF) is always running or not.

Note:
  1. The requesting peripheral, or the main clock, must take the oscillator start-up time into account.
  2. The oscillator signal is only available if requested and will be available after two OSCHF cycles.
ValueDescription
0The OSCHF oscillator will only run when requested by a peripheral or by the main clock (1)
1The OSCHF oscillator will always run in Active, Idle and Standby sleep modes (2)

Bit 6 – ALGSEL Algorithm Selection

This bit determines which tuning algorithm is used after a USB bus reset. It must be written simultaneously with writing the SOF setting to the AUTOTUNE bit field to configure the tuning logic. This bit is considerable only when the SOF setting is written to the AUTOTUNE bit field.
Note:
  1. Using the binary search algorithm may temporarily change the oscillator output frequency to up half the tune range, affecting timing critical asynchronous peripherals running, such as the USART or a timer generating PWM waveforms.
ValueDescription
0Binary search(1)
1Incremental search up to five tune steps

Bits 5:2 – FRQSEL[3:0] Frequency Select

This bit field controls the internal high-frequency oscillator (OSCHF) output frequency.
ValueNameDescription
0x001M1 MHz output
0x012M2 MHz output
0x023M3 MHz output
0x034M4 MHz output (default)
0x04-Reserved
0x058M8 MHz output
0x0612M12 MHz output
0x0716M16 MHz output
0x0820M20 MHz output
0x0924M24 MHz output
Other-Reserved

Bits 1:0 – AUTOTUNE[1:0] Automatic Oscillator Tune

This bit field controls whether the internal high-frequency oscillator (OSCHF) auto-tune functionality is enabled or not.

ValueNameDescription
0x00OFFAutomatic oscillator frequency tune disabled
0x0132KAutomatic oscillator frequency tune against XOSC32K enabled
0x02SOFAutomatic oscillator frequency tune against USB SOF enabled