C8051T620/1/6/7 & C8051T320/1/2/3
128
Rev. 1.2
21.1. System Clock Selection
The CLKSL[2:0] bits in register CLKSEL select which oscillator source is used as the system clock.
CLKSL[2:0] must be set to 001b for the system clock to run from the external oscillator; however the exter-
nal oscillator may still clock certain peripherals (timers, PCA) when the internal oscillator is selected as the
system clock. The system clock may be switched on-the-fly between the internal oscillators and external
oscillator so long as the selected clock source is enabled and running.
The internal high-frequency and low-frequency oscillators require little start-up time and may be selected
as the system clock immediately following the register write which enables the oscillator. The external RC
and C modes also typically require no startup time.
21.2. USB Clock Selection
The USBCLK[2:0] bits in register CLKSEL select which oscillator source is used as the USB clock. The
USB clock may be derived from the internal oscillators, a divided version of the internal High-Frequency
oscillator, or a divided version of the external oscillator. Note that the USB clock must be 48 MHz when
operating USB0 as a Full Speed Function; the USB clock must be 6 MHz when operating USB0 as a Low
Speed Function. See SFR Definition 21.1 for USB clock selection options.
Some example USB clock configurations for Full and Low Speed mode are given below:
USB Full Speed (48 MHz)
Internal Oscillator
Clock Signal
Input Source Selection
Register Bit Settings
USB Clock
Internal Oscillator*
USBCLK = 000b
Internal Oscillator
Divide by 1
IFCN = 11b
External Oscillator
Clock Signal
Input Source Selection
Register Bit Settings
USB Clock
External Oscillator
USBCLK = 010b
External Oscillator
CMOS Oscillator Mode
48 MHz Oscillator
XOSCMD = 010b
Note:
Clock Recovery must be enabled for this configuration.
USB Low Speed (6 MHz)
Internal Oscillator
Clock Signal
Input Source Selection
Register Bit Settings
USB Clock
Internal Oscillator / 8
USBCLK = 001b
Internal Oscillator
Divide by 1
IFCN = 11b
External Oscillator
Clock Signal
Input Source Selection
Register Bit Settings
USB Clock
External Oscillator / 4
USBCLK = 101b
External Oscillator
CMOS Oscillator Mode
24 MHz Oscillator
XOSCMD = 010b
Crystal Oscillator Mode
24 MHz Oscillator
XOSCMD = 110b
XFCN = 111b