Product Specs

Table Of Contents
25 RTC Real-time counter
Page
242
32.768 kHz
task
event
task
event
task
task
event
RTC
CC[0:3]
COUNTER
PRESCALER
f
RTC
[kHz] = 32.768 / (PRESCALER + 1 )
25 RTC Real-time counter
The Real-time counter (RTC) module provides a generic, low power timer on the low-frequency clock source
(LFCLK).
START
STOP
CLEAR
TICK
OVRFLW
TRIGOVRFLW COMPARE[0..N]
Figure 43: RTC block schematic
The RTC module features a 24-bit COUNTER, a 12-bit (1/X) prescaler, capture/compare registers, and a tick
event generator for low power, tickless RTOS implementation.
25.1 Clock source
The RTC will run off the LFCLK.
The COUNTER resolution will therefore be 30.517 µs. Depending on the source, the RTC is able to run while
the HFCLK is OFF and PCLK16M is not available.
The software has to explicitely start LFCLK before using the RTC.
See CLOCK Clock control on page 101 for more information about clock sources.
25.2 Resolution versus overflow and the PRESCALER
Counter increment frequency:
The PRESCALER register is read/write when the RTC is stopped. The PRESCALER register is read-only
once the RTC is STARTed. Writing to the PRESCALER register when the RTC is started has no effect.
The PRESCALER is restarted on START, CLEAR and TRIGOVRFLW, that is, the prescaler value is latched
to an internal register (<<PRESC>>) on these tasks.
Examples:
1. Desired COUNTER frequency 100 Hz (10 ms counter period)
PRESCALER = round(32.768 kHz / 100 Hz) - 1 = 327
f
RTC
= 99.9 Hz