16.8.7 32kHz Internal Oscillator (OSC32K) Control

Name: OSC32K
Offset: 0x18
Reset: 0x003F0080
Property: Write-Protected

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
  CALIB[6:0] 
Access R/WR/WR/WR/WR/WR/WR/W 
Reset 0111111 
Bit 15141312111098 
    WRTLOCK STARTUP[2:0] 
Access R/WR/WR/WR/W 
Reset 0000 
Bit 76543210 
 ONDEMANDRUNSTDBY   EN32KENABLE  
Access R/WR/WR/WR/W 
Reset 1000 

Bits 22:16 – CALIB[6:0] Oscillator Calibration

These bits control the oscillator calibration.

This value must be written by the user.

Factory calibration values can be loaded from the non-volatile memory.

Bit 12 – WRTLOCK Write Lock

This bit locks the OSC32K register for future writes to fix the OSC32K configuration.

ValueDescription
0 The OSC32K configuration is not locked.
1 The OSC32K configuration is locked.

Bits 10:8 – STARTUP[2:0] Oscillator Start-Up Time

These bits select start-up time for the oscillator.

The OSCULP32K oscillator is used as input clock to the startup counter.

Table 16-4. Start-Up Time for 32kHz Internal Oscillator
STARTUP[2:0] Number of OSC32K clock cycles Approximate Equivalent Time

(OSCULP= 32 kHz)(1)(2)(3)

0x0 3 92μs
0x1 4 122μs
0x2 6 183μs
0x3 10 305μs
0x4 18 549μs
0x5 34 1038μs
0x6 66 2014μs
0x7 130 3967μs

Notes: 1. Number of cycles for the start-up counter.

2. Number of cycles for the synchronization delay, before PCLKSR.OSC32KRDY is set.

3. Start-up time is n OSC32K cycles + 2 OSC32K cycles.

Bit 7 – ONDEMAND 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 OSC32K.RUNSTDBY bit is one. If OSC32K.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

This bit controls how the OSC32K 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 OSC32K.ONDEMAND is one, the clock source will be running when a peripheral is requesting the clock. If OSC32K.ONDEMAND is zero, the clock source will always be running in standby sleep mode.

Bit 2 – EN32K 32kHz Output Enable

ValueDescription
0 The 32kHz output is disabled.
1 The 32kHz output is enabled.
0 The oscillator is disabled.
1 The oscillator is enabled.

Bit 1 – ENABLE Oscillator Enable

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