14.8.3 Generator Control

GENCTRLn controls the settings of Generic Generator n (n=[11:0]). The reset value is 0x00000106 for Generator n=0, else 0x00000000

Name: GENCTRLn
Offset: 0x20 + n*0x04 [n=0..11]
Reset: 0x00000106
Property: PAC Write-Protection, Write-Synchronized

Bit 3130292827262524 
 DIV[15:8] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 
Bit 2322212019181716 
 DIV[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 
Bit 15141312111098 
   RUNSTDBYDIVSELOEOOVIDCGENEN 
Access R/WR/WR/WR/WR/WR/W 
Reset 000001 
Bit 76543210 
     SRC[3:0] 
Access R/WR/WR/WR/W 
Reset 0000 

Bits 31:16 – DIV[15:0] Division Factor

These bits represent a division value for the corresponding Generator. The actual division factor is dependent on the state of DIVSEL. The number of relevant DIV bits for each Generator can be seen in this table. Written bits outside of the specified range will be ignored.

Table 14-6. Division Factor Bits
Generic Clock GeneratorDivision Factor BitsMaximum Division Factor
Generator 08 division factor bits - DIV[7:0]512
Generator 116 division factor bits - DIV[15:0]131072
Generator 2 - 118 division factor bits - DIV[7:0]512

Bit 13 – RUNSTDBY Run in Standby

This bit is used to keep the Generator running in Standby as long as it is configured to output to a dedicated GCLK_IOn pin. If GENCTRLn.OE is zero, this bit has no effect and the generator will only be running if a peripheral requires the clock.

ValueDescription
0The Generator is stopped in Standby and the GCLK_IOn pin state (one or zero) will be dependent on the setting in GENCTRL.OOV.
1The Generator is kept running and output to its dedicated GCLK_IOn pin during Standby mode.

Bit 12 – DIVSEL Divide Selection

This bit determines how the division factor of the clock source of the Generator will be calculated from DIV. If the clock source should not be divided, DIVSEL must be 0 and the GENCTRLn.DIV value must be either 0 or 1.

ValueDescription
0The Generator clock frequency equals the clock source frequency divided by GENCTRLn.DIV.
1The Generator clock frequency equals the clock source frequency divided by 2^(N+1), where N is the Division Factor Bits for the selected generator (refer to GENCTRLn.DIV).

Bit 11 – OE Output Enable

This bit is used to output the Generator clock output to the corresponding pin (GCLK_IO[7..0]), as long as GCLK_IOn is not defined as the Generator source in the GENCTRLn.SRC bit field.

ValueDescription
0No Generator clock signal on pin GCLK_IOn.
1The Generator clock signal is output on the corresponding GCLK_IOn, unless GCLK_IOn is selected as a generator source in the GENCTRLn.SRC bit field.

Bit 10 – OOV Output Off Value

This bit is used to control the clock output value on pin (GCLK_IO[7..0]) when the Generator is turned off or the OE bit is zero, as long as GCLK_IOn is not defined as the Generator source in the GENCTRLn.SRC bit field.

ValueDescription
0The GCLK_IOn will be LOW when generator is turned off or when the OE bit is zero.
1The GCLK_IOn will be HIGH when generator is turned off or when the OE bit is zero.

Bit 9 – IDC Improve Duty Cycle

This bit is used to improve the duty cycle of the Generator output to 50/50 for odd division factors.

ValueDescription
0Generator output clock duty cycle is not balanced to 50/50 for odd division factors.
1Generator output clock duty cycle is 50/50.

Bit 8 – GENEN Generator Enable

This bit is used to enable and disable the Generator.

ValueDescription
0Generator is disabled.
1Generator is enabled.

Bits 3:0 – SRC[3:0] Generator Clock Source Selection

These bits select the Generator clock source, as shown in this table.

Table 14-3. Generator Clock Source Selection
ValueNameDescription
0x00XOSC0XOSC 0 oscillator output
0x01XOSC1XOSC 1 oscillator output
0x02GCLK_INGenerator input pad (GCLK_IO)
0x03GCLK_GEN1Generic clock generator 1 output
0x04OSCULP32KOSCULP32K oscillator output
0x05XOSC32KXOSC32K oscillator output
0x06DFLLDFLL48M oscillator output
0x07DPLL0FDPLL200M0 output
0x08DPLL1FDPLL200M1 output
0x09-0x0FReservedReserved

A Power Reset will reset all GENCTRLn registers. the Reset values of the GENCTRLn registers are shown in table below.

Table 14-4. GENCTRLn Reset Value after a Power Reset
GCLK GeneratorReset Value after a Power Reset
00x00000106
others0x00000000

A User Reset will reset the associated GENCTRL register unless the Generator is the source of a locked Peripheral Channel (PCHCTRLm.WRTLOCK=1). The reset values of the GENCTRL register are as shown in the table below.

Table 14-5. GENCTRLn Reset Value after a User Reset
GCLK GeneratorReset Value after a User Reset
00x00000106
othersNo change if the generator is used by a Peripheral Channel m with PCHCTRLm.WRTLOCK=1

else 0x00000000