21.7.1 Control A

Name: CTRLA
Offset: 0x00
Reset: 0x0000
Property: PAC Write-Protection, Enable-Protected, Write-Synchronized

Bit 15141312111098 
 COUNTSYNC   PRESCALER[3:0] 
Access R/WR/WR/WR/WR/W 
Reset 00000 
Bit 76543210 
     MODE[1:0]ENABLESWRST 
Access R/WR/WR/WR/W 
Reset 0000 

Bit 15 – COUNTSYNC COUNT Read Resynchronization Enable

This bit controls the continuous read resynchronization of the COUNT register.
Note: This bit is not enable-protected.
ValueDescription
0Continuous read resynchronization of COUNT is disabled. The values in COUNT are not continuously updated and are invalid.
1Continuous read resynchronization of COUNT is enabled. The values in COUNT are continuously updated and valid.

Bits 11:8 – PRESCALER[3:0] Prescaler

This bit field controls the prescaling factor for the RTC clock source (CLK_RTC_OSC) to generate the counter clock (CLK_RTC_CNT). Periodic events and interrupts are not available when the prescaler is off.
Note: This bit field is not synchronized.
ValueNameDescription
0x0OFFCLK_RTC_CNT = GCLK_RTC/1
0x1DIV1CLK_RTC_CNT = GCLK_RTC/1
0x2DIV2CLK_RTC_CNT = GCLK_RTC/2
0x3DIV4CLK_RTC_CNT = GCLK_RTC/4
0x4DIV8CLK_RTC_CNT = GCLK_RTC/8
0x5DIV16CLK_RTC_CNT = GCLK_RTC/16
0x6DIV32CLK_RTC_CNT = GCLK_RTC/32
0x7DIV64CLK_RTC_CNT = GCLK_RTC/64
0x8DIV128CLK_RTC_CNT = GCLK_RTC/128
0x9DIV256CLK_RTC_CNT = GCLK_RTC/256
0xADIV512CLK_RTC_CNT = GCLK_RTC/512
0xBDIV1024CLK_RTC_CNT = GCLK_RTC/1024
OtherReserved

Bits 3:2 – MODE[1:0] Operating Mode

This bit field controls the operating mode of the RTC.
Note: This bit field is not synchronized.
ValueNameDescription
0x0COUNT32Mode 0: 32-bit counter
0x1COUNT16Mode 1: 16-bit counter
0x2CLOCKMode 2: Clock/calendar
OtherReserved

Bit 1 – ENABLE Enable

This bit controls whether the RTC is enabled.

Due to synchronization, there is a delay from writing to CTRLA.ENABLE until the RTC is enabled or disabled. The value written to CTRLA.ENABLE will be read back immediately and the Enable bit in the Synchronization Busy register (SYNCBUSY.ENABLE) will be set. SYNCBUSY.ENABLE will be cleared when the operation is complete.

Note: This bit is not enable-protected.
ValueDescription
0The RTC is or being disabled
1The RTC is or being enabled

Bit 0 – SWRST Software Reset

Writing a ‘0’ to this bit has no effect.

Writing a ‘1’ to this bit resets all registers in the RTC, except DBGCTRL, to their initial state, and the RTC will be disabled.

Due to synchronization, there is a delay from writing to CTRLA.SWRST until the reset is complete. CTRLA.SWRST and SYNCBUSY.SWRST will both be cleared when the reset is complete.

Note:
  1. This bit is not enable protected.
  2. Writing a ‘1’ to CTRL.SWRST will always take precedence, meaning that all other writes in the same write operation will be discarded.
  3. The RTC should be disabled before the RTC is reset to avoid undefined behavior.
ValueDescription
0There is no reset operation ongoing
1The reset operation is ongoing