Datasheet

38
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
6.11 Register Description
6.11.1 CLKSEL0 – Clock Selection Register 0
Bit 7-6 – RCSUT[1:0]: SUT for RC oscillator
These two bits are the SUT value for the RC Oscillator. If the RC oscillator is selected by fuse bits, the SUT fuse
are copied into these bits. A firmware change will not have any effect because this additional start-up time is
only used after a reset and not after a clock switch.
Bit 5-4 – EXSUT[1:0]: SUT for External Clock/ Low Power Crystal Oscillator
These two bits are the SUT value for the External Clock / Low Power Crystal Oscillator. If the External Clock /
Low Power Crystal Oscillator is selected by fuse bits, the SUT fuses are copied into these bits. The firmware
can modify these bits by writing a new value. This value will be used at the next start of the External Clock / Low
Power Crystal Oscillator.
Bit 3 – RCE: Enable RC Oscillator
The RCE bit must be written to logic one to enable the RC Oscillator. The RCE bit must be written to logic zero
to disable the RC Oscillator.
Bit 2 – EXTE: Enable External Clock / Low Power Crystal Oscillator
The OSCE bit must be written to logic one to enable External Clock / Low Power Crystal Oscillator. The OSCE
bit must be written to logic zero to disable the External Clock / Low Power Crystal Oscillator.
Bit 0 – CLKS: Clock Selector
The CLKS bit must be written to logic one to select the External Clock / Low Power Crystal Oscillator as CPU
clock. The CLKS bit must be written to logic zero to select the RC Oscillator as CPU clock. After a reset, the
CLKS bit is set by hardware if the External Clock / Low Power Crystal Oscillator is selected by the fuse bits con-
figuration.
The firmware has to check if the clock is correctly started before selected it.
6.11.2 CLKSEL1 – Clock Selection Register 1
Bit 7-4 – RCCKSEL[3:0]: CKSEL for RC oscillator
Clock configuration for the RC Oscillator. After a reset, this part of the register is loaded with the 0010b value
that corresponds to the RC oscillator. Modifying this value by firmware before switching to RC oscillator is pro-
hibited because the RC clock will not start.
Bit 3-0 – EXCKSEL[3:0]: CKSEL for External Clock / Low Power Crystal Oscillator
Clock configuration for the External Clock / Low Power Crystal Oscillator. After a reset, if the External Clock /
Low Power Crystal Oscillator is selected by fuse bits, this part of the register is loaded with the fuse configura-
tion. Firmware can modify it to change the start-up time after the clock switch.
See Table 6-1 on page 28 for EXCKSEL[3:0] configuration. Only Low Power Crystal Oscillator, Calibrated Inter-
nal RC Oscillator, and External Clock modes are allowed.
Bit 7 6 5 4 3210
RCSUT1 RCSUT0 EXSUT1 EXSUT0 RCE EXTE - CLKS CLKSEL0
Read/Write R/W R/W R/W R/W R/W R/W R R/W
Initial Value 0 0 0 0 See Bit Description
Bit7 6 5 4 3210
RCCKSEL3 RCCKSEL2 RCCKSEL1 RCCKSEL0 EXCKSEL3 EXCKSEL2 EXCKSEL1 EXCKSEL0 CLKSEL1
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value0 0 1 0 0000