Atmel Xplained Pro Evaluation Kit ATSAM4E-XPRO ATSAM4E-XPRO Fiche De Données

Codes de produits
ATSAM4E-XPRO
Page de 1506
SAM4E [DATASHEET]
Atmel-11157D-ATARM-SAM4E16-SAM4E8-Datasheet_12-Jun-14
578
29.5.3   3 to 20 MHz Crystal or Ceramic Resonator-based Oscillator
After reset, the 3 to 20 MHz crystal or ceramic resonator-based oscillator is disabled and it is not selected as the
source of MAINCK.
The user can select the 3 to 20 MHz crystal or ceramic resonator-based oscillator to be the source of MAINCK, as
it provides a more accurate frequency. The software enables or disables the main oscillator so as to reduce power
consumption by clearing the MOSCXTEN bit in  CKGR_MOR. 
When disabling the main oscillator by clearing the MOSCXTEN bit in CKGR_MOR, the MOSCXTS bit in PMC_SR
is automatically cleared, indicating the main clock is off.
When enabling the main oscillator, the user must initiate the main oscillator counter with a value corresponding to
the start-up time of the oscillator. This start-up time depends on the crystal frequency connected to the oscillator.
When the MOSCXTEN bit and the MOSCXTST are written in CKGR_MOR to enable the main oscillator, the XIN
and XOUT pins are automatically switched into oscillator mode and MOSCXTS bit in PMC_SR is cleared and the
counter starts counting down on the slow clock divided by 8 from the MOSCXTST value. Since the MOSCXTST
value is coded with 8 bits, the maximum start-up time is about 62 ms.
When the counter reaches 0, the MOSCXTS bit is set, indicating that the main clock is valid. Setting the
MOSCXTS bit in the Interrupt Mask Register (PMC_IMR) can trigger an interrupt to the processor.