English
Language : 

C8051F321-GMR Datasheet, PDF (123/250 Pages) Silicon Laboratories – Full Speed USB, 16 k ISP FLASH MCU Family
C8051F320/1
13.4. System and USB Clock Selection
The internal oscillator requires little start-up time and may be selected as the system or USB clock immedi-
ately following the OSCICN write that enables the internal oscillator. External crystals and ceramic resona-
tors typically require a start-up time before they are settled and ready for use. The Crystal Valid Flag
(XTLVLD in register OSCXCN) is set to ‘1’ by hardware when the external oscillator is settled. To avoid
reading a false XTLVLD, in crystal mode software should delay at least 1 ms between enabling the
external oscillator and checking XTLVLD. RC and C modes typically require no startup time.
13.4.1. System Clock Selection
The CLKSL[1:0] bits in register CLKSEL select which oscillator source is used as the system clock.
CLKSL[1:0] must be set to 01b for the system clock to run from the external oscillator; however the exter-
nal oscillator may still clock certain peripherals (timers, PCA, USB) when the internal oscillator is selected
as the system clock. The system clock may be switched on-the-fly between the internal oscillator, external
oscillator, and 4x Clock Multiplier so long as the selected oscillator is enabled and has settled.
13.4.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 4x Clock Multiplier output, a divided version of the internal 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 Figure 13.5 for USB clock selection options.
Some example USB clock configurations for Full and Low Speed mode are given below:
Table 13.1. Typical USB Full Speed Clock Settings
Clock Signal
USB Clock
Clock Multiplier Input
Internal Oscillator
Input Source Selection
Clock Multiplier
Internal Oscillator*
Register Bit Settings
USBCLK = 000b
MULSEL = 00b
Internal Oscillator
Divide by 1
IFCN = 11b
External Oscillator
Clock Signal
Input Source Selection Register Bit Settings
USB Clock
Clock Multiplier
USBCLK = 000b
Clock Multiplier Input
External Oscillator
MULSEL = 01b
External Oscillator
Crystal Oscillator Mode XOSCMD = 110b
12 MHz Crystal
XFCN = 111b
*Note: Clock Recovery must be enabled for this configuration.
Rev. 1.4
123