The Real-Time Counter (RTC) module of the SAM L22 family is a 32-bit counter with a 10-bit programmable prescaler that typically runs continuously to keep track of the time. The RTC can wake up the device from sleep modes by using the alarm/compare wake up, periodic wake up, or overflow wake up mechanisms, or from the wake inputs.

The RTC can generate periodic peripheral events from the outputs of the prescaler, as well as alarm/compare interrupts and peripheral events, which can trigger at any counter value. Additionally, the timer can trigger an overflow interrupt and peripheral event, and can be reset on the occurrence of an alarm/compare match. This allows periodic interrupts and peripheral events at very long and accurate intervals.

The 10-bit programmable prescaler can scale down the clock source. By this, a wide range of resolutions and timeout periods can be configured. With a 32.768kHz clock source, the minimum counter tick interval is 30.5μs, and timeout periods can range up to 36 hours. For a counter tick interval of 1s, the maximum timeout period is more than 136 years.