Datasheet

529
SAM3X / SAM3A [DATASHEET]
Atmel-11057C-ATARM-SAM3X-SAM3A-Datasheet_23-Mar-15
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).
When a peripheral clock is disabled, the clock is immediately stopped. The peripheral clocks are automatically
disabled after a reset.
In order to stop a peripheral, it is recommended that the system software wait until the peripheral has executed its
last programmed operation before disabling the clock. This is to avoid data corruption or erroneous behavior of the
system.
The bit number within the Peripheral Clock Control registers (PMC_PCER0-1, PMC_PCDR0-1, and
PMC_PCSR0-1) is the Peripheral Identifier defined at the product level. The bit number corresponds to the
interrupt source number assigned to the peripheral.
In order to save power consumption, the clock of CAN0, CAN1 peripherals can be MCK divided by a division factor
of 1, 2, 4.
This is done by setting the PMC_PCR register. It features a command and acts like a mailbox. To write the division
factor, the user needs to write a WRITE command, the peripheral ID and the chosen division factor. To read the
curr
ent divis
ion factor, the user just needs to write the READ command and the peripheral ID. Then a read access
on PMC_PCR must be performed.
DIV must not be changed while peripheral is in use or when the peripheral clock is enabled.To change the clock
division factor (DIV) of a peripheral, its clock must first be disabled by writing either EN to 0 for the corresponding
PID (DIV must be kept the same if this method is used), or writing to PMC_PCDR register. Then a second write
must be performed into PMC_PCR with the new value of DIV and a third write must be performed to enable the
peripheral clock (either by using PMC_PCR or PMC_PCER register).
Code Example to select divider 4 for peripheral index 43 (0x2B) and enable its clock:
write_register(PMC_PCR,0x1002102B)
Code Example to read the divider of the same peripheral:
write_register(PMC_PCR,0x0000002B)
read_register(PMC_PCR)
28.8 Free Running Processor Clock
The Free Running Processor Clock (FCLK) used for sampling interrupts and clocking debug blocks ensures that
interrupts can be sampled, and sleep events can be traced, while the processor is sleeping. It is connected to
Master Clock (MCK).
28.9 Programmable Clock Output Controller
The PMC controls 3 signals to be output on external pins, PCKx. Each signal can be independently programmed
via the Programmable Clock Registers (PMC_PCKx).
PCKx can be independently selected between the Slow Clock (SLCK), the Main Clock (MAINCK), the PLLA Clock
(PLLACK), UTMI PLL Clock (UPLLCK/2) and the Master Clock (MCK) by writing the CSS field in PMC_PCKx.
Each output signal can also be divided by a power of 2 between 1 and 64 by writing the PRES (Prescaler) field in
PMC_PCKx.
Each output signal can be enabled and disabled by writing 1 in the corresponding bit, PCKx of PMC_SCER and
PMC_SCDR, respectively. Status of the active programmable output clocks are given in the PCKx bits of
PMC_SCSR (System Clock Status Register).