EasyManua.ls Logo

Cypress FM4 Series - Clock Setup Procedure Examples

Cypress FM4 Series
1102 pages
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...
CHAPTER 2-1: Clock
52 FM4 Peripheral Manual, Doc. No. 002-04856 Rev. *E
4. Clock Setup Procedure Examples
This section explains procedure examples of setting up clocks.
Setup Procedure Examples
Figure 4-1 Example of Clock Setup Procedure (Power-on -> High-speed CR Run Mode -> Desired Clock Mode)
(Except TYPE5-M4 products)
Access the Clock Stabilization Wait Time Register
(CSW_TMR). Set the main clock oscillation
stabilization wait time.
Access the Interrupt Enable Register (INT_ENR).
Set the oscillation stabilization wait interrupt.
Enable the main clock oscillation in the System Clock
Mode Control Register (SCM_CTL:MOSCE=1).
Yes
No
High-speed CR / low-speed CR oscillation stabilization
wait completed. high-speed CR runs as a master clock.
Use the main clock?
with SCM:STR:RCM=SCM_CTL:RCS, changing.
the mode to the selected clock mode.
Access each bus prescaler register.
BSC_PSR : Base Clock Prescaler
Set bus clock frequency division.
Enable the sub oscillation.
Yes
No
Access the PLL Clock Stabilization Wait Time
Register (PSW_TMR). Set the PLL oscillation
stabilization wait time and PLL input clock.
Access the Interrupt Enable Register (INT_ENR).
Set the oscillation stabilization wait interrupt.
Access the PLL control register1, 2 (PLL_CTL1,
PLL_CTL2). Set the PLL multiplication ratio.
Enable the PLL oscillation in the System Clock
Mode Control Register (SCM_CTL:PLLE=1).
No
Access the Interrupt Clear Register (INT_CLR).
Clear the oscillation satbilization wait interrupt factor.
Yes
Use the PLL clock?
Use the sub clock?
Power-on
* Only low-speed CR run
mode is selectable.
Check main clock oscillation stable bit of the System
Clock Mode Status Register (SCM_STR:MORDY=1).
oscillation enabling.
Complete waiting for
Waiting for high-speed CR / low-speed CR
oscillation stability
Set the master clock switch control bit of the System Clock Mode Control
Register (SCM_CTL:RCS) to desired clock mode.
Use the PLL clock?
No
Yes
*
U
s
e high-speed CR clock
i
for the PLL input clock.
APBC0_PSR : APB0 Prescaler
TTC_PSR : Trace Clock Prescaler
Start waiting for
oscillation stability.
Check PLL oscillation stable bit of the System
Clock Mode Status Register (SCM_STR:PLRDY=).
Start waiting for
oscillation stability.
Complete waiting for
oscillation stability.
oscillation stability.
APBC1_PSR : APB1 Prescaler
APBC2_PSR : APB2 Prescaler
Complete the sub
See Figure 4-2

Table of Contents

Related product manuals