14.8.4 Generic Clock Generator Control
Name: | GENCTRL |
Offset: | 0x4 |
Reset: | 0x00000000 |
Property: | Write-Protected, Write-Synchronized |
Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
Access | |||||||||
Reset |
Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
RUNSTDBY | DIVSEL | OE | OOV | IDC | GENEN | ||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
Reset | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
SRC[4:0] | |||||||||
Access | R/W | R/W | R/W | R/W | R/W | ||||
Reset | 0 | 0 | 0 | 0 | 0 |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
ID[3:0] | |||||||||
Access | R/W | R/W | R/W | R/W | |||||
Reset | 0 | 0 | 0 | 0 |
Bit 21 – RUNSTDBY Run in Standby
This bit is used to keep the generic clock generator running when it is configured to be output to its dedicated GCLK_IO pin. If GENCTRL.OE is zero, this bit has no effect and the generic clock generator will only be running if a peripheral requires the clock.
Value | Description |
---|---|
0 | The generic clock generator is stopped in standby and the GCLK_IO pin state (one or zero) will be dependent on the setting in GENCTRL.OOV. |
1 | The generic clock generator is kept running and output to its dedicated GCLK_IO pin during standby mode. |
Bit 20 – DIVSEL Divide Selection
This bit is used to decide how the clock source used by the generic clock generator will be divided. If the clock source should not be divided, the DIVSEL bit must be zero and the GENDIV.DIV value for the corresponding generic clock generator must be zero or one.
Value | Description |
---|---|
0 | The generic clock generator equals the clock source divided by GENDIV.DIV. |
1 | The generic clock generator equals the clock source divided by 2^(GENDIV.DIV+1). |
Bit 19 – OE Output Enable
This bit is used to enable output of the generated clock to GCLK_IO when GCLK_IO is not selected as a source in the GENCLK.SRC bit group.
Value | Description |
---|---|
0 | The generic clock generator is not output. |
1 | The generic clock generator is output to the corresponding GCLK_IO, unless the corresponding GCLK_IO is selected as a source in the GENCLK.SRC bit group. |
Bit 18 – OOV Output Off Value
This bit is used to control the value of GCLK_IO when GCLK_IO is not selected as a source in the GENCLK.SRC bit group.
Value | Description |
---|---|
0 | The GCLK_IO will be zero when the generic clock generator is turned off or when the OE bit is zero. |
1 | The GCLK_IO will be one when the generic clock generator is turned off or when the OE bit is zero. |
Bit 17 – IDC Improve Duty Cycle
This bit is used to improve the duty cycle of the generic clock generator when odd division factors are used.
Value | Description |
---|---|
0 | The generic clock generator duty cycle is not 50/50 for odd division factors. |
1 | The generic clock generator duty cycle is 50/50. |
Bit 16 – GENEN Generic Clock Generator Enable
This bit is used to enable and disable the generic clock generator.
Value | Description |
---|---|
0 | The generic clock generator is disabled. |
1 | The generic clock generator is enabled. |
Bits 12:8 – SRC[4:0] Source Select
These bits define the clock source to be used as the source for the generic clock generator, as shown in the table below.
Value | Name | Description |
---|---|---|
0x00 | XOSC | XOSC oscillator output |
0x01 | GCLKIN | Generator input pad |
0x02 | GCLKGEN1 | Generic clock generator 1 output |
0x03 | OSCULP32K | OSCULP32K oscillator output |
0x04 | OSC32K | OSC32K oscillator output |
0x05 | XOSC32K | XOSC32K oscillator output |
0x06 | OSC8M | OSC8M oscillator output |
0x07 | DFLL48M | DFLL48M output |
0x08-0x1F | Reserved | Reserved for future use |
Bits 3:0 – ID[3:0] Generic Clock Generator Selection
These bits select the generic clock generator that will be configured or read. The value of the ID bit group versus which generic clock generator is configured is shown in the next table.
A power reset will reset the GENCTRL register for all IDs, including the generic clock generator used by the RTC. If a generic clock generator ID other than generic clock generator 0 is not a source of a “locked” generic clock or a source of the RTC generic clock, a user reset will reset the GENCTRL for this ID.
Values | Names | Description |
---|---|---|
0x0 | GCLKGEN0 | Generic clock generator 0 |
0x1 | GCLKGEN0 | Generic clock generator 0 |
0x2 | GCLKGEN0 | Generic clock generator 0 |
0x3 | GCLKGEN0 | Generic clock generator 0 |
0x4 | GCLKGEN0 | Generic clock generator 0 |
0x5 | GCLKGEN0 | Generic clock generator 0 |
0x6 | GCLKGEN0 | Generic clock generator 0 |
0x7 | GCLKGEN0 | Generic clock generator 0 |
0x8-0xF | - | Reserved for future use |
After a power reset, the reset value of the GENCTRL register is as shown in the next table.
GCLK Generator ID | Reset Value after a Power Reset |
---|---|
0x00 | 0x00010600 |
0x01 | 0x00000001 |
0x02 | 0x00010302 |
0x03 | 0x00000003 |
0x04 | 0x00000004 |
0x05 | 0x00000005 |
0x06 | 0x00000006 |
0x07 | 0x00000007 |
After a user reset, the reset value of the GENCTRL register is as shown in the table below.
GCLK Generator ID | Reset Value after a User Reset |
---|---|
0x00 | 0x00010600 |
0x01 | 0x00000001 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x02 | 0x00010302 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x03 | 0x00000003 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x04 | 0x00000004 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x05 | 0x00000005 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x06 | 0x00000006 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |
0x07 | 0x00000007 if the generator is not used by the RTC and not a source of a 'locked' generic clock No change if the generator is used by the RTC or used by a GCLK with a WRTLOCK as one |