ATSAML21G18B RTC registers

The 31 registers of RTC (Real-Time Counter), from 0x40002000, with their reset value and every field. The ATSAML21G18B has 1265 registers in 40 peripherals, one page each.

RTC Real-Time Counter

MODE0.CTRLAMODE0 Control A

Address
0x40002000
Reset
0x0000
Access
read/write
Size
16-bit
6 fields
FieldBitsWhat it does
COUNTSYNC15Count Read Synchronization Enable
PRESCALER11:8Prescaler
  • 0 CLK_RTC_CNT = GCLK_RTC/1
  • 1 CLK_RTC_CNT = GCLK_RTC/1
  • 2 CLK_RTC_CNT = GCLK_RTC/2
  • 3 CLK_RTC_CNT = GCLK_RTC/4
  • 4 CLK_RTC_CNT = GCLK_RTC/8
  • 5 CLK_RTC_CNT = GCLK_RTC/16
  • 6 CLK_RTC_CNT = GCLK_RTC/32
  • 7 CLK_RTC_CNT = GCLK_RTC/64
  • 8 CLK_RTC_CNT = GCLK_RTC/128
  • 9 CLK_RTC_CNT = GCLK_RTC/256
  • 10 CLK_RTC_CNT = GCLK_RTC/512
  • 11 CLK_RTC_CNT = GCLK_RTC/1024
MATCHCLR7Clear on Match
MODE3:2Operating Mode
  • 0 Mode 0: 32-bit Counter
  • 1 Mode 1: 16-bit Counter
  • 2 Mode 2: Clock/Calendar
ENABLE1Enable
SWRST0Software Reset

MODE1.CTRLAMODE1 Control A

Address
0x40002000
Reset
0x0000
Access
read/write
Size
16-bit
5 fields
FieldBitsWhat it does
COUNTSYNC15Count Read Synchronization Enable
PRESCALER11:8Prescaler
  • 0 CLK_RTC_CNT = GCLK_RTC/1
  • 1 CLK_RTC_CNT = GCLK_RTC/1
  • 2 CLK_RTC_CNT = GCLK_RTC/2
  • 3 CLK_RTC_CNT = GCLK_RTC/4
  • 4 CLK_RTC_CNT = GCLK_RTC/8
  • 5 CLK_RTC_CNT = GCLK_RTC/16
  • 6 CLK_RTC_CNT = GCLK_RTC/32
  • 7 CLK_RTC_CNT = GCLK_RTC/64
  • 8 CLK_RTC_CNT = GCLK_RTC/128
  • 9 CLK_RTC_CNT = GCLK_RTC/256
  • 10 CLK_RTC_CNT = GCLK_RTC/512
  • 11 CLK_RTC_CNT = GCLK_RTC/1024
MODE3:2Operating Mode
  • 0 Mode 0: 32-bit Counter
  • 1 Mode 1: 16-bit Counter
  • 2 Mode 2: Clock/Calendar
ENABLE1Enable
SWRST0Software Reset

MODE2.CTRLAMODE2 Control A

Address
0x40002000
Reset
0x0000
Access
read/write
Size
16-bit
7 fields
FieldBitsWhat it does
CLOCKSYNC15Clock Read Synchronization Enable
PRESCALER11:8Prescaler
  • 0 CLK_RTC_CNT = GCLK_RTC/1
  • 1 CLK_RTC_CNT = GCLK_RTC/1
  • 2 CLK_RTC_CNT = GCLK_RTC/2
  • 3 CLK_RTC_CNT = GCLK_RTC/4
  • 4 CLK_RTC_CNT = GCLK_RTC/8
  • 5 CLK_RTC_CNT = GCLK_RTC/16
  • 6 CLK_RTC_CNT = GCLK_RTC/32
  • 7 CLK_RTC_CNT = GCLK_RTC/64
  • 8 CLK_RTC_CNT = GCLK_RTC/128
  • 9 CLK_RTC_CNT = GCLK_RTC/256
  • 10 CLK_RTC_CNT = GCLK_RTC/512
  • 11 CLK_RTC_CNT = GCLK_RTC/1024
MATCHCLR7Clear on Match
CLKREP6Clock Representation
MODE3:2Operating Mode
  • 0 Mode 0: 32-bit Counter
  • 1 Mode 1: 16-bit Counter
  • 2 Mode 2: Clock/Calendar
ENABLE1Enable
SWRST0Software Reset

MODE0.EVCTRLMODE0 Event Control

Address
0x40002004
Reset
0x00000000
Access
read/write
Size
32-bit
10 fields
FieldBitsWhat it does
OVFEO15Overflow Event Output Enable
CMPEO08Compare 0 Event Output Enable
PEREO77Periodic Interval 7 Event Output Enable
PEREO66Periodic Interval 6 Event Output Enable
PEREO55Periodic Interval 5 Event Output Enable
PEREO44Periodic Interval 4 Event Output Enable
PEREO33Periodic Interval 3 Event Output Enable
PEREO22Periodic Interval 2 Event Output Enable
PEREO11Periodic Interval 1 Event Output Enable
PEREO00Periodic Interval 0 Event Output Enable

MODE1.EVCTRLMODE1 Event Control

Address
0x40002004
Reset
0x00000000
Access
read/write
Size
32-bit
11 fields
FieldBitsWhat it does
OVFEO15Overflow Event Output Enable
CMPEO19Compare 1 Event Output Enable
CMPEO08Compare 0 Event Output Enable
PEREO77Periodic Interval 7 Event Output Enable
PEREO66Periodic Interval 6 Event Output Enable
PEREO55Periodic Interval 5 Event Output Enable
PEREO44Periodic Interval 4 Event Output Enable
PEREO33Periodic Interval 3 Event Output Enable
PEREO22Periodic Interval 2 Event Output Enable
PEREO11Periodic Interval 1 Event Output Enable
PEREO00Periodic Interval 0 Event Output Enable

MODE2.EVCTRLMODE2 Event Control

Address
0x40002004
Reset
0x00000000
Access
read/write
Size
32-bit
10 fields
FieldBitsWhat it does
OVFEO15Overflow Event Output Enable
ALARMEO08Alarm 0 Event Output Enable
PEREO77Periodic Interval 7 Event Output Enable
PEREO66Periodic Interval 6 Event Output Enable
PEREO55Periodic Interval 5 Event Output Enable
PEREO44Periodic Interval 4 Event Output Enable
PEREO33Periodic Interval 3 Event Output Enable
PEREO22Periodic Interval 2 Event Output Enable
PEREO11Periodic Interval 1 Event Output Enable
PEREO00Periodic Interval 0 Event Output Enable

MODE0.INTENCLRMODE0 Interrupt Enable Clear

Address
0x40002008
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
CMP08Compare 0 Interrupt Enable
PER77Periodic Interval 7 Interrupt Enable
PER66Periodic Interval 6 Interrupt Enable
PER55Periodic Interval 5 Interrupt Enable
PER44Periodic Interval 4 Interrupt Enable
PER33Periodic Interval 3 Interrupt Enable
PER22Periodic Interval 2 Interrupt Enable
PER11Periodic Interval 1 Interrupt Enable
PER00Periodic Interval 0 Interrupt Enable

MODE1.INTENCLRMODE1 Interrupt Enable Clear

Address
0x40002008
Reset
0x0000
Access
read/write
Size
16-bit
11 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
CMP19Compare 1 Interrupt Enable
CMP08Compare 0 Interrupt Enable
PER77Periodic Interval 7 Interrupt Enable
PER66Periodic Interval 6 Interrupt Enable
PER55Periodic Interval 5 Interrupt Enable
PER44Periodic Interval 4 Interrupt Enable
PER33Periodic Interval 3 Interrupt Enable
PER22Periodic Interval 2 Interrupt Enable
PER11Periodic Interval 1 Interrupt Enable
PER00Periodic Interval 0 Interrupt Enable

MODE2.INTENCLRMODE2 Interrupt Enable Clear

Address
0x40002008
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
ALARM08Alarm 0 Interrupt Enable
PER77Periodic Interval 7 Interrupt Enable
PER66Periodic Interval 6 Interrupt Enable
PER55Periodic Interval 5 Interrupt Enable
PER44Periodic Interval 4 Interrupt Enable
PER33Periodic Interval 3 Interrupt Enable
PER22Periodic Interval 2 Interrupt Enable
PER11Periodic Interval 1 Interrupt Enable
PER00Periodic Interval 0 Interrupt Enable

MODE0.INTENSETMODE0 Interrupt Enable Set

Address
0x4000200A
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
CMP08Compare 0 Interrupt Enable
PER77Periodic Interval 7 Interrupt Enable
PER66Periodic Interval 6 Interrupt Enable
PER55Periodic Interval 5 Interrupt Enable
PER44Periodic Interval 4 Interrupt Enable
PER33Periodic Interval 3 Interrupt Enable
PER22Periodic Interval 2 Interrupt Enable
PER11Periodic Interval 1 Interrupt Enable
PER00Periodic Interval 0 Interrupt Enable

MODE1.INTENSETMODE1 Interrupt Enable Set

Address
0x4000200A
Reset
0x0000
Access
read/write
Size
16-bit
11 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
CMP19Compare 1 Interrupt Enable
CMP08Compare 0 Interrupt Enable
PER77Periodic Interval 7 Interrupt Enable
PER66Periodic Interval 6 Interrupt Enable
PER55Periodic Interval 5 Interrupt Enable
PER44Periodic Interval 4 Interrupt Enable
PER33Periodic Interval 3 Interrupt Enable
PER22Periodic Interval 2 Interrupt Enable
PER11Periodic Interval 1 Interrupt Enable
PER00Periodic Interval 0 Interrupt Enable

MODE2.INTENSETMODE2 Interrupt Enable Set

Address
0x4000200A
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow Interrupt Enable
ALARM08Alarm 0 Interrupt Enable
PER77Periodic Interval 7 Enable
PER66Periodic Interval 6 Enable
PER55Periodic Interval 5 Enable
PER44Periodic Interval 4 Enable
PER33Periodic Interval 3 Enable
PER22Periodic Interval 2 Enable
PER11Periodic Interval 1 Enable
PER00Periodic Interval 0 Enable

MODE0.INTFLAGMODE0 Interrupt Flag Status and Clear

Address
0x4000200C
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow
CMP08Compare 0
PER77Periodic Interval 7
PER66Periodic Interval 6
PER55Periodic Interval 5
PER44Periodic Interval 4
PER33Periodic Interval 3
PER22Periodic Interval 2
PER11Periodic Interval 1
PER00Periodic Interval 0

MODE1.INTFLAGMODE1 Interrupt Flag Status and Clear

Address
0x4000200C
Reset
0x0000
Access
read/write
Size
16-bit
11 fields
FieldBitsWhat it does
OVF15Overflow
CMP19Compare 1
CMP08Compare 0
PER77Periodic Interval 7
PER66Periodic Interval 6
PER55Periodic Interval 5
PER44Periodic Interval 4
PER33Periodic Interval 3
PER22Periodic Interval 2
PER11Periodic Interval 1
PER00Periodic Interval 0

MODE2.INTFLAGMODE2 Interrupt Flag Status and Clear

Address
0x4000200C
Reset
0x0000
Access
read/write
Size
16-bit
10 fields
FieldBitsWhat it does
OVF15Overflow
ALARM08Alarm 0
PER77Periodic Interval 7
PER66Periodic Interval 6
PER55Periodic Interval 5
PER44Periodic Interval 4
PER33Periodic Interval 3
PER22Periodic Interval 2
PER11Periodic Interval 1
PER00Periodic Interval 0

DBGCTRLDebug Control

Address
0x4000200E
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2–
  7. 1–
  8. 0DBGRUN
1 field
FieldBitsWhat it does
DBGRUN0Run During Debug

MODE0.SYNCBUSYMODE0 Synchronization Busy Status

Address
0x40002010
Reset
0x00000000
Access
read only
Size
32-bit
6 fields
FieldBitsWhat it does
COUNTSYNC15Count Read Synchronization Enable Bit Busy
COMP05COMP 0 Register Busy
COUNT3COUNT Register Busy
FREQCORR2FREQCORR Register Busy
ENABLE1Enable Bit Busy
SWRST0Software Reset Busy

MODE1.SYNCBUSYMODE1 Synchronization Busy Status

Address
0x40002010
Reset
0x00000000
Access
read only
Size
32-bit
8 fields
FieldBitsWhat it does
COUNTSYNC15Count Read Synchronization Enable Bit Busy
COMP16COMP 1 Register Busy
COMP05COMP 0 Register Busy
PER4PER Register Busy
COUNT3COUNT Register Busy
FREQCORR2FREQCORR Register Busy
ENABLE1Enable Bit Busy
SWRST0Software Reset Bit Busy

MODE2.SYNCBUSYMODE2 Synchronization Busy Status

Address
0x40002010
Reset
0x00000000
Access
read only
Size
32-bit
7 fields
FieldBitsWhat it does
CLOCKSYNC15Clock Read Synchronization Enable Bit Busy
MASK011MASK 0 Register Busy
ALARM05ALARM 0 Register Busy
CLOCK3CLOCK Register Busy
FREQCORR2FREQCORR Register Busy
ENABLE1Enable Bit Busy
SWRST0Software Reset Bit Busy

FREQCORRFrequency Correction

Address
0x40002014
Reset
0x00
Access
read/write
  1. 7SIGN
  2. 6VALUE6
  3. 5VALUE5
  4. 4VALUE4
  5. 3VALUE3
  6. 2VALUE2
  7. 1VALUE1
  8. 0VALUE0
2 fields
FieldBitsWhat it does
SIGN7Correction Sign
VALUE6:0Correction Value

MODE0.COUNTMODE0 Counter Value

Address
0x40002018
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
COUNT31:0Counter Value

MODE1.COUNTMODE1 Counter Value

Address
0x40002018
Reset
0x0000
Access
read/write
Size
16-bit
1 field
FieldBitsWhat it does
COUNT15:0Counter Value

MODE2.CLOCKMODE2 Clock Value

Address
0x40002018
Reset
0x00000000
Access
read/write
Size
32-bit
6 fields
FieldBitsWhat it does
MONTH25:22Month
DAY21:17Day
HOUR16:12Hour
  • 0 AM when CLKREP in 12-hour
  • 16 PM when CLKREP in 12-hour
MINUTE11:6Minute
SECOND5:0Second
YEAR31:26Year

MODE1.PERMODE1 Counter Period

Address
0x4000201C
Reset
0x0000
Access
read/write
Size
16-bit
1 field
FieldBitsWhat it does
PER15:0Counter Period

MODE0.COMPMODE0 Compare n Value

Address
0x40002020
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
COMP31:0Compare Value

MODE1.COMP0MODE1 Compare n Value

Address
0x40002020
Reset
0x0000
Access
read/write
Size
16-bit
1 field
FieldBitsWhat it does
COMP15:0Compare Value

MODE2.ALARMMODE2_ALARM Alarm n Value

Address
0x40002020
Reset
0x00000000
Access
read/write
Size
32-bit
6 fields
FieldBitsWhat it does
MONTH25:22Month
DAY21:17Day
HOUR16:12Hour
  • 0 Morning hour
  • 16 Afternoon hour
MINUTE11:6Minute
SECOND5:0Second
YEAR31:26Year

MODE1.COMP1MODE1 Compare n Value

Address
0x40002022
Reset
0x0000
Access
read/write
Size
16-bit
1 field
FieldBitsWhat it does
COMP15:0Compare Value

MODE2.MASKMODE2_ALARM Alarm n Mask

Address
0x40002024
Reset
0x00
Access
read/write
  1. 7–
  2. 6–
  3. 5–
  4. 4–
  5. 3–
  6. 2SEL2
  7. 1SEL1
  8. 0SEL0
1 field
FieldBitsWhat it does
SEL2:0Alarm Mask Selection
  • 0 Alarm Disabled
  • 1 Match seconds only
  • 2 Match seconds and minutes only
  • 3 Match seconds, minutes, and hours only
  • 4 Match seconds, minutes, hours, and days only
  • 5 Match seconds, minutes, hours, days, and months only
  • 6 Match seconds, minutes, hours, days, months, and years

GP0General Purpose

Address
0x40002040
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
GP31:0General Purpose

GP1General Purpose

Address
0x40002044
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
GP31:0General Purpose