OSC8M

8MHz Internal Oscillator (OSC8M) Control

  0x20 32 Write-Protected 0xXXXX0382  

8MHz Internal Oscillator (OSC8M) Control

Bit  31 30 29 28 27 26 25 24  
  FRANGE[1:0]     CALIB[11:8]  
Access  R/W R/W     R/W R/W R/W R/W  
Reset  x x     0 0 0 0  
Bit  23 22 21 20 19 18 17 16  
  CALIB[7:0]  
Access  R/W R/W R/W R/W R/W R/W R/W R/W  
Reset  0 0 0 0 0 0 0 x  
Bit  15 14 13 12 11 10 9 8  
              PRESC[1:0]  
Access              R/W R/W  
Reset              1 1  
Bit  7 6 5 4 3 2 1 0  
  ONDEMAND RUNSTDBY         ENABLE    
Access  R/W R/W         R/W    
Reset  1 0         1    

Bits 31:30 – FRANGE[1:0]: Oscillator Frequency Range

Oscillator Frequency Range

These bits control the oscillator frequency range according to the table below. These bits are loaded from Flash Calibration at startup.

FRANGE[1:0] Description
0x0 4 to 6MHz
0x1 6 to 8MHz
0x2 8 to 11MHz
0x3 11 to 15MHz

Bits 27:16 – CALIB[11:0]: Oscillator Calibration

Oscillator Calibration

These bits control the oscillator calibration. The calibration field is split in two:

CALIB[11:6] is for temperature calibration

CALIB[5:0] is for overall process calibration

These bits are loaded from Flash Calibration at startup.

Bits 9:8 – PRESC[1:0]: Oscillator Prescaler

Oscillator Prescaler

These bits select the oscillator prescaler factor setting according to the table below.

PRESC[1:0] Description
0x0 1
0x1 2
0x2 4
0x3 8

Bit 7 – ONDEMAND: On Demand Control

On Demand Control

The On Demand operation mode allows an oscillator to be enabled or disabled depending on peripheral clock requests.

In On Demand operation mode, i.e., if the ONDEMAND bit has been previously written to one, the oscillator will only be running when requested by a peripheral. If there is no peripheral requesting the oscillator's clock source, the oscillator will be in a disabled state.

If On Demand is disabled the oscillator will always be running when enabled.

In standby sleep mode, the On Demand operation is still active if the OSC8M.RUNSTDBY bit is one. If OSC8M.RUNSTDBY is zero, the oscillator is disabled.

ValueDescription
0 The oscillator is always on, if enabled.
1 The oscillator is enabled when a peripheral is requesting the oscillator to be used as a clock source. The oscillator is disabled if no peripheral is requesting the clock source.

Bit 6 – RUNSTDBY: Run in Standby

Run in Standby

This bit controls how the OSC8M behaves during standby sleep mode:

ValueDescription
0 The oscillator is disabled in standby sleep mode.
1 The oscillator is not stopped in standby sleep mode. If OSC8M.ONDEMAND is one, the clock source will be running when a peripheral is requesting the clock. If OSC8M.ONDEMAND is zero, the clock source will always be running in standby sleep mode.

Bit 1 – ENABLE: Oscillator Enable

Oscillator Enable

The user must ensure that the OSC8M is fully disabled before enabling it, and that the OSC8M is fully enabled before disabling it by reading OSC8M.ENABLE.

ValueDescription
0 The oscillator is disabled or being enabled.
1 The oscillator is enabled or being disabled.