CKGR_MOR

PMC Clock Generator Main Oscillator Register

This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.

  0x0020 32 Read/Write 0x00000008  

PMC Clock Generator Main Oscillator Register

Bit  31 30 29 28 27 26 25 24  
            XT32KFME CFDEN MOSCSEL  
Access                   
Reset            0 0 0  
Bit  23 22 21 20 19 18 17 16  
  KEY[7:0]  
Access                   
Reset  0 0 0 0 0 0 0 0  
Bit  15 14 13 12 11 10 9 8  
  MOSCXTST[7:0]  
Access                   
Reset  0 0 0 0 0 0 0 0  
Bit  7 6 5 4 3 2 1 0  
    MOSCRCF[2:0] MOSCRCEN WAITMODE MOSCXTBY MOSCXTEN  
Access                   
Reset    0 0 0 1 0 0 0  

Bit 0 – MOSCXTEN: Main Crystal Oscillator Enable

Main Crystal Oscillator Enable

A crystal must be connected between XIN and XOUT.

When MOSCXTEN is set, the MOSCXTS flag is set once the Main crystal oscillator startup time is achieved.

ValueDescription
0

The Main crystal oscillator is disabled.

1

The Main crystal oscillator is enabled. MOSCXTBY must be cleared.

Bit 1 – MOSCXTBY: Main Crystal Oscillator Bypass

Main Crystal Oscillator Bypass

When MOSCXTBY is set, the MOSCXTS flag in PMC_SR is automatically set.

Clearing MOSCXTEN and MOSCXTBY bits clears the MOSCXTS flag.

ValueDescription
0

No effect.

1

The Main crystal oscillator is bypassed. MOSCXTEN must be cleared. An external clock must be connected on XIN.

Note: When the crystal oscillator bypass is disabled (MOSCXTBY = 0), the MOSCXTS flag must be read at ‘0’ in PMC_SR before enabling the crystal oscillator (MOSCXTEN = 1).

Bit 2 – WAITMODE: Wait Mode Command (write-only)

Wait Mode Command (write-only)

ValueDescription
0

No effect.

1

Puts the device in Wait mode.

Bit 3 – MOSCRCEN: Main RC Oscillator Enable

Main RC Oscillator Enable

When MOSCRCEN is set, the MOSCRCS flag is set once the Main RC oscillator startup time is achieved.

ValueDescription
0

The Main RC oscillator is disabled.

1

The Main RC oscillator is enabled.

Bits 6:4 – MOSCRCF[2:0]: Main RC Oscillator Frequency Selection

Main RC Oscillator Frequency Selection

At startup, the Main RC oscillator frequency is 12 MHz.

ValueNameDescription
0 4_MHz

The RC oscillator frequency is at 4 MHz

1 8_MHz

The RC oscillator frequency is at 8 MHz

2 12_MHz

The RC oscillator frequency is at 12 MHz

Note: MOSCRCF must be changed only if MOSCRCS is set in the PMC_SR. Therefore MOSCRCF and MOSCRCEN cannot be changed at the same time.

Bits 15:8 – MOSCXTST[7:0]: Main Crystal Oscillator Startup Time

Main Crystal Oscillator Startup Time

Specifies the number of SLCK cycles multiplied by 8 for the main crystal oscillator startup time.

Bits 23:16 – KEY[7:0]: Write Access Password

Write Access Password

ValueNameDescription
0x37 PASSWD

Writing any other value in this field aborts the write operation.

Always reads as 0.

Bit 24 – MOSCSEL: Main Clock Oscillator Selection

Main Clock Oscillator Selection

ValueDescription
0

The Main RC oscillator is selected.

1

The Main crystal oscillator is selected.

Bit 25 – CFDEN: Clock Failure Detector Enable

Clock Failure Detector Enable

ValueDescription
0

The clock failure detector is disabled.

1

The clock failure detector is enabled.

Bit 26 – XT32KFME: 32.768 kHz Crystal Oscillator Frequency Monitoring Enable

32.768 kHz Crystal Oscillator Frequency Monitoring Enable

ValueDescription
0

The 32.768 kHz crystal oscillator frequency monitoring is disabled.

1

The 32.768 kHz crystal oscillator frequency monitoring is enabled.