12.2.1 Block Diagram - CLKCTRL
The clock system consists of the main clock and clocks derived from the main clock,
as well as several asynchronous clocks:
- Main Clock (CLK_MAIN) always run in Active mode and Idle sleep mode. If requested, it will also run in Standby sleep mode.
- CLK_MAIN is prescaled and distributed by the clock controller:
- CLK_CPU is used by the CPU, the SRAM and the Nonvolatile Memory Controller (NVMCTRL)
- CLK_PER is used by all peripherals that are not listed under asynchronous clocks and can also be routed to the CLKOUT pin
- All the clock sources can be used as the main clock
- Clocks running asynchronously to
the main clock domain:
- CLK_RTC is used by the Real-Time Counter (RTC) and the Periodic Interrupt Timer (PIT). It will be requested when the RTC/PIT is enabled. The clock source for CLK_RTC may be changed only if the peripheral is disabled.
- CLK_WDT is used by the Watchdog Timer (WDT). It will be requested when the WDT is enabled.
- CLK_BOD is used by the Brown-out Detector (BOD). It will be requested when the BOD is enabled in the Sampled mode. A fuse controls the alternative clock source.
The clock source for the main clock domain is configured by writing to the Clock Select (CLKSEL) bit field in the Main Clock Control A (CLKCTRL.MCLKCTRLA) register. This register has Configuration Change Protection (CCP). Write the appropriate key to the CCP register before writing to the CLKSEL bit field. The asynchronous clock sources are configured by the registers in the respective peripheral.