14.8.3 Generic Clock Control

Name: CLKCTRL
Offset: 0x2
Reset: 0x0000
Property: Write-Protected

Bit 15141312111098 
 WRTLOCKCLKEN  GEN[3:0] 
Access R/WR/WR/WR/WR/WR/W 
Reset 000000 
Bit 76543210 
   ID[5:0] 
Access R/WR/WR/WR/WR/WR/W 
Reset 000000 

Bit 15 – WRTLOCK Write Lock

When this bit is written, it will lock from further writes the generic clock pointed to by CLKCTRL.ID, the generic clock generator pointed to in CLKCTRL.GEN and the division factor used in the generic clock generator. It can only be unlocked by a power reset.

One exception to this is generic clock generator 0, which cannot be locked.

ValueDescription
0The generic clock and the associated generic clock generator and division factor are not locked.
1The generic clock and the associated generic clock generator and division factor are locked.

Bit 14 – CLKEN Clock Enable

This bit is used to enable and disable a generic clock.

ValueDescription
0The generic clock is disabled.
1The generic clock is enabled.

Bits 11:8 – GEN[3:0] Generic Clock Generator

Table 14-3. Generic Clock Generator
GEN[3:0]NameDescription
0x0GCLKGEN0Generic clock generator 0
0x1GCLKGEN1Generic clock generator 1
0x2GCLKGEN2Generic clock generator 2
0x3GCLKGEN3Generic clock generator 3
0x4GCLKGEN4Generic clock generator 4
0x5GCLKGEN5Generic clock generator 5
0x6GCLKGEN6Generic clock generator 6
0x7GCLKGEN7Generic clock generator 7
0x8-0xFReservedReserved

Bits 5:0 – ID[5:0] Generic Clock Selection ID

These bits select the generic clock that will be configured. The value of the ID bit group versus module instance is shown in the table below.

A power reset will reset the CLKCTRL register for all IDs, including the RTC. If the WRTLOCK bit of the corresponding ID is zero and the ID is not the RTC, a user reset will reset the CLKCTRL register for this ID.

After a power reset, the reset value of the CLKCTRL register versus module instance is as shown in the next table.

Table 14-4. Generic Clock Selection ID and CLKCTRL value after Power Reset
Module InstanceReset Value after Power Reset
CLKCTRL.GENCLKCTRL.CLKENCLKCTRL.WRTLOCK
RTC0x000x000x00
WDT0x020x01 if WDT Enable bit in NVM
User Row written to one
0x00 if WDT Enable bit in NVM
User Row written to zero0x01 if WDT Always-On bit in
NVM User Row written to one
0x00 if WDT Always-On bit in
NVM User Row written to zero
Others0x000x000x00

After a user reset, the reset value of the CLKCTRL register versus module instance is as shown in the table below.

Table 14-5. Generic Clock Selection ID and CLKCTRL Value after User Reset
Module InstanceReset Value after a User Reset
CLKCTRL.GENCLCTRL.CLKENCLKCTRL.WRTLOCK
RTC0x00 if WRTLOCK=0 and
CLKEN=0
No change if WRTLOCK=1
or CLKEN=10x00 if WRTLOCK=0 and CLKEN=0
No change if WRTLOCK=1 or CLKEN=1No change
WDT0x02 if WRTLOCK=0
No change if WRTLOCK=1If WRTLOCK=0
0x01 if WDT Enable bit in NVM User
Row written to one
0x00 if WDT Enable bit in NVM User
Row written to zero
If WRTLOCK=1 no changeNo change
Others0x00 if WRTLOCK=0
No change if WRTLOCK=10x00 if WRTLOCK=0
No change if WRTLOCK=1No change
ValueNameDescription
0x00GCLK_DFLL48M_REFDFLL48M Reference
0x01GCLK_WDTWDT
0x02GCLK_RTCRTC
0x03GCLK_EICEIC
0x04GCLK_EVSYS_CHANNEL_0EVSYS_CHANNEL_0
0x05GCLK_EVSYS_CHANNEL_1EVSYS_CHANNEL_1
0x06GCLK_EVSYS_CHANNEL_2EVSYS_CHANNEL_2
0x07GCLK_EVSYS_CHANNEL_3EVSYS_CHANNEL_3
0x08GCLK_EVSYS_CHANNEL_4EVSYS_CHANNEL_4
0x09GCLK_EVSYS_CHANNEL_5EVSYS_CHANNEL_5
0x0AGCLK_EVSYS_CHANNEL_6EVSYS_CHANNEL_6
0x0BGCLK_EVSYS_CHANNEL_7EVSYS_CHANNEL_7
0x0CGCLK_SERCOMx_SLOWSERCOMx_SLOW
0x0DGCLK_SERCOM0_CORESERCOM0_CORE
0x0EGCLK_SERCOM1_CORESERCOM1_CORE
0x0FGCLK_SERCOM2_CORESERCOM2_CORE
0x10GCLK_SERCOM3_CORESERCOM3_CORE
0x11GCLK_SERCOM4_CORESERCOM4_CORE
0x12GCLK_SERCOM5_CORESERCOM5_CORE
0x13GCLK_TC0, GCLK_TC1TC0, TC1
0x14GCLK_TC2, GCLK_TC3TC2, TC3
0x15GCLK_TC4, GCLK_TC5TC4, TC5
0x16GCLK_TC6, GCLK_TC7TC6, TC7
0x17GCLK_ADCADC
0x18GCLK_AC_DIGAC_DIG
0x19GCLK_AC_ANAAC_ANA
0x1AGCLK_DACDAC
0x1BGCLK_PTCPTC
0x1C-0x3F-Reserved