EasyManua.ls Logo

Cmsemicon CMS32L051 - Example of Setting up an X1 Oscillation Circuit

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 4 Clock Generation Circuit
www.mcu.com.cn 89 / 703
4.6.2 Example of setting up an X1 oscillation circuit
After the reset is released, the CPU/peripheral hardware clock (f
CLK
) must be running at a high-speed
internal oscillator clock. Thereafter, if the oscillation clock is changed to X1, the oscillation circuit is set and the
oscillation start control is controlled by the oscillation settling time selection register (OSTS), the clock operation
mode control register (CMC), and the clock running state control register (CSC). And wait for the oscillation to
stabilize through the status register (OSTC) of the oscillation settling time counter. After waiting for the oscillation
to stabilize, set the X1 oscillation clock to fCLK through the system clock control register (CKC).
[Register Setting] The registers must be set in order from (1) to (5).
(1) Put the OSCSEL position of the CMC register 1, when f
X
is greater than or equal to 10MHz, the
AMPH Position 1 to make the X1 oscillation circuit run.
7 6 5 4 3 2 1 0
Cmc
(2) The oscillation stabilization time of the X1 oscillation circuit when the deep sleep mode is released is
selected through the OSTS register.
Example) To wait at least 102 us through a 10MHz resonator, it must be set to the following values.
7 6 5 4 3 2 1 0
OSTS
(3) Clear the MSTOP bit of the CSC register to 0 so that the X1 oscillation circuit begins to oscillate.
7 6 5 4 3 2 1 0
CSC
(4) Wait through the OSC register for the oscillation of the X1 oscillation circuit to stabilize.
Example) To wait at least 102 us through a 10MHz resonator, you must wait until you change to the
following values.
7 6 5 4 3 2 1 0
OSTC
(5) Set the X1 oscillation clock to the CPU/peripheral hardware clock through the MCM0 bit of the CKC
register.
7 6 5 4 3 2 1 0
CKC
EXCLK
0
OSCSEL
1
EXCLKS
0
OSCSELS
0
0
AMPHS1
0
AMPHS0
0
AMPH
0/1
0
0
0
0
0
OSTS2
0
OSTS1
1
OsTS0
0
MSTOP
0
XTSTOP
1
0
0
0
0
0
HIOSTOP
0
MOST8
1
MOST9
1
MOST10
1
MOST110
MOST13
0
MOST15
0
MOST17
0
MOST18
0
0
0
0
0
0
OSTS20
OSTS11
OsTS00
CLS0
CSS
0
MCS
0
MCM0
1
0
0
0
0
MSTOP0
XTSTOP1
0
0
0
0
0
HIOSTOP0

Table of Contents

Related product manuals