537
SAM4CP [DATASHEET]
43051E–ATPL–08/14
30.4
Master Clock Controller
The Master Clock Controller provides selection and division of the Master Clock (MCK) and Coprocessor Master Clock
(CPMCK). MCK is the clock provided to all the peripherals in the sub-system 0 and CPMCK is the clock provided to all
peripherals in the sub-system 1). The Master Clock is selected from one of the clocks provided by the Clock Generator.
Selecting the Slow Clock provides a Slow Clock signal to the whole device. Selecting the Main Clock saves power
consumption of the PLLs. The Master Clock Controller is made up of a clock selector and a prescaler.
The Master Clock selection is made by writing the CSS/CPCSS field (Clock Source Selection/Coprocessor Clock Source
Selection) in PMC_MCKR (Master Clock Register). The prescaler supports the division by a power of 2 of the selected
clock between 1 and 64, and the division by 3. The PRES/CPPRES field in PMC_MCKR programs the prescaler.
Each time PMC_MCKR is written to define a new Master Clock, the MCKRDY bit is cleared in PMC_SR. It reads 0 until
the Master Clock is established. Then, the MCKRDY bit is set and can trigger an interrupt to the processor. This feature
is useful when switching from a high speed clock to a lower one to inform the software when the change is actually done.
Figure 30-2.
Master Clock Controller
30.5
Processor Clock Controller
The PMC features a Processor Clock Controller (HCLK) and a Coprocessor Clock Controller (CPHCLK) that implements
the Processor Sleep Mode. The Processor Clocks can be disabled by executing the WFI (WaitForInterrupt) processor
instruction.
The Processor Clock Controller (HCLK) is enabled after a reset and is automatically re-enabled by any enabled interrupt.
The Coprocessor Clock Controller (CPHCLK) is disabled after reset. It is up to the Master application to enable the
CPHCLK. Similar to HCLK, CPHCLK is automatically re-enabled by any enabled instruction after having executed a WFI
instruction. The Processor Sleep Mode is entered by disabling the Processor Clock, which is automatically re-enabled by
any enabled fast or normal interrupt, or by the reset of the product.
When Processor Sleep Mode is entered, the current instruction is finished before the clock is stopped, but this does not
prevent data transfers from other masters of the system bus.
30.6
SysTick Clock
The SysTick calibration value is fixed to 8000 which allows the generation of a time base of 1 ms with SysTick clock to
the maximum frequency on MCK divided by 8.
30.7
Peripheral Clock Controller
The Power Management Controller controls the clocks of each embedded peripheral by means of the Peripheral Clock
Controller. The user can individually enable and disable the Clock on the peripherals.
The user can also enable and disable these clocks by writing Peripheral Clock Enable 0 (PMC_PCER0), Peripheral
Clock Disable 0 (PMC_PCDR0), Peripheral Clock Enable 1 (PMC_PCER1) and Peripheral Clock Disable 1
(PMC_PCDR1) registers. The status of the peripheral clock activity can be read in the Peripheral Clock Status Register
(PMC_PCSR0) and Peripheral Clock Status Register (PMC_PCSR1).
SLCK
Master Clock
Prescaler
To the MCK Divider
PRES
CSS
MAINCK
PLLACK
PLLBCK
To the Processor
Clock Controller (PCK)
PMC_MCKR
PMC_MCKR