Datasheet

253
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
15. Real-time Timer (RTT)
15.1 Description
The Real-time Timer is built around a 32-bit counter used to count roll-over events of the programmable 16-bit prescaler
which enables counting elapsed seconds from a 32 kHz slow clock source. It generates a periodic interrupt and/or
triggers an alarm on a programmed value.
It can be configured to be driven by the 1 Hz signal generated by the RTC, thus taking advantage of a calibrated 1 Hz
clock.
The slow clock source can be fully disabled to reduce power consumption when RTT is not required.
15.2 Embedded Characteristics
32-bit Free-running Counter on prescaled slow clock or RTC calibrated 1 Hz clock
16-bit Configurable Prescaler
Interrupt on Alarm
15.3 Block Diagram
Figure 15-1. Real-time Timer
15.4 Functional Description
The Real-time Timer can be used to count elapsed seconds. It is built around a 32-bit counter fed by Slow Clock divided
by a programmable 16-bit value. The value can be programmed in the field RTPRES of the Real-time Mode Register
(RTT_MR).
Programming RTPRES at 0x00008000 corresponds to feeding the real-time counter with a 1 Hz signal (if the Slow Clock
is 32.768 kHz). The 32-bit counter can count up to 2
32
seconds, corresponding to more than 136 years, then roll over to
0.
SLCK
RTPRES
RT TI N C
ALMS
16-bit
Divider
32-bit
Counter
ALMV
=
CRTV
RT T_M R
RT T_VR
RT T_A R
RT T_SR
RT TI N CIEN
RT T_M R
0
10
ALMIEN
rtt_int
RT T_M R
set
set
RT T_SR
read
RT T_SR
reset
reset
RT T_M R
reload
rtt_alarm
RT TRST
RT T_M R
RT TRST
RT T_M R
RT TDI S
10
RT T_M R
CLKSRC
RTC 1 H z