13.17.1 CRU Oscillator Control
Note: The system unlock sequence must be done before this register can be written.
| Name: | OSCCON |
| Offset: | 0x00 |
| Reset: | 0x00000000 |
| Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| FRCDIV[2:0] | |||||||||
| Access | R/W/L | R/W/L | R/W/L | ||||||
| Reset | 0 | 0 | 0 | ||||||
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| DRMEN | 2SPDSLP | ||||||||
| Access | R/W/L | R/W/L | |||||||
| Reset | 0 | 1 |
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| COSC[3:0] | NOSC[3:0] | ||||||||
| Access | R | R | R | R | R/W/L | R/W/L | R/W/L | R/W/L | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| CLKLOCK | SLPEN | CF | SOSCEN | OSWEN | |||||
| Access | R/W/L | R/W/L | R/W/HS/L | R/W/L | R/W/HC/L | ||||
| Reset | 0 | 0 | 0 | 1 | 1 |
Bits 26:24 – FRCDIV[2:0] Fast RC Clock Divider bits
| Value | Description |
|---|---|
| 000 | FRC Divide by 1 (default value) |
| 001 | FRC Divide by 2 |
| 010 | FRC Divide by 4 |
| 011 | FRC Divide by 8 |
| 100 | FRC Divide by 16 |
| 101 | FRC Divide by 32 |
| 110 | FRC Divide by 64 |
| 111 | FRC Divide by 256 |
Bit 23 – DRMEN Enable the Dream Mode bit
| Value | Description |
|---|---|
| 1 | When the cpu has executed WFI instruction and SLPEN = 1, peripheral clock requests are NOT active causes to enter the Sleep mode |
| 0 | DMA transfer has no effect |
Bit 21 – 2SPDSLP 2-Speed Start-up enabled in the Sleep mode bit
Note: Default Reset Value is specified by cfg_two_speed_startup_en input.
| Value | Description |
|---|---|
| 1 | When the device exits the Sleep Mode, the SYS_CLK will be from FRC until the selected clock is ready |
| 0 | When the device exits the Sleep Mode, the SYS_CLK will be from the selected clock |
Bits 15:12 – COSC[3:0] Current Oscillator Selection bits (Read-only)
Note:
- The default value on Reset is
4’b0000, which ensures that a virgin die has frc_clk running for ICDJTAG or EJTAG to program the NVR. - Loaded with NOSC[3:0] at the completion of a successful clock switch.
- Set to FRC value (0000) when FSCM detects a failure and switches clock to FRC.
| Value | Description |
|---|---|
| 0000 | Fast RC Oscillator (FRC) divided by OSCCON.FRCDIV |
| 0001 | System PLL Clock-1 (SPLL1 Module) (input clock and divider set by SPLLCON) |
| 0010 | Primary Oscillator (POSC) |
| 0011 | Secondary Oscillator (SOSC) |
| 0100 | Low Power RC Oscillator (LPRC) |
| 0101-1111 | Reserved for future use |
Bits 11:8 – NOSC[3:0] New Oscillator Selection bits
Note: Default value on Reset is
4’b0000, which ensures that a virgin die has frc_clk running for ICDJTAG or EJTAG to program the NVR.| Value | Description |
|---|---|
| 0000 | Fast RC Oscillator (FRC) divided by OSCCON.FRCDIV |
| 0001 | System PLL Clock-1 (SPLL1 Module) (input clock and divider set by SPLLCON) |
| 0010 | Primary Oscillator (POSC) |
| 0011 | Secondary Oscillator (SOSC) |
| 0100 | Low Power RC Oscillator (LPRC) |
| 0101-1111 | Reserved for future use |
Bit 7 – CLKLOCK Clock Lock Enabled bit
Note:
- Once set, this bit can only be cleared via a Device Reset.
- When active, this bit prevents writes to the following registers: NOSC[3:0] and OSWEN.
| Value | Description |
|---|---|
| 1 | All clock and PLL configuration registers are locked. These include OSCCON, OSCTRIM, SPLLCON, UPLLCON, PBxDIV |
| 0 | Clock and PLL selection registers are not locked, configurations may be modified. |
Bit 4 – SLPEN Enable the Sleep Mode bit
| Value | Description |
|---|---|
| 1 | When a WAIT Instruction is executed device will enter SLEEP Mode |
| 0 | When a WAIT instruction is executed device will enter IDLE Mode |
Bit 3 – CF Clock Fail Detect bit (Read/writable/Clearable by application)
Note:
- Writing a ‘
1’ to this bit will cause a clock switching sequence to be initiated by the clock switch state machine - Resets when a valid clock switching sequence is initiated by the clock switch state machine
- This bit is set when clock fail event is detected
| Value | Description |
|---|---|
| 1 | FSCM has detected clock failure |
| 0 | FSCM has not detected clock failure |
Bit 1 – SOSCEN 32 kHz Secondary (LP) Oscillator Enable bit
| Value | Description |
|---|---|
| 1 | Enable Secondary Oscillator |
| 0 | Disable Secondary Oscillator |
Bit 0 – OSWEN Oscillator Switch Enable bit
Note:
- A Write of value ‘
0’ has no effect. - Cleared by hardware after a successful clock switch
- Cleared by hardware after a redundant clock switch (NOSC = COSC)
- Cleared by hardware after FSCM switches the oscillator to Fail-Safe Clock Source (FRC)
| Value | Description |
|---|---|
| 1 | Request oscillator switch to selection specified by NOSC[3:0] bits |
| 0 | Oscillator switch is complete |
