[go: up one dir, main page]

RTC

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

RTC

Real Time Clock


Features
• Measures the passage of time to maintain a calendar
and clock.
• Ultra Low Power design to support battery powered
systems.
• Provides Seconds, Minutes, Hours, Day of Month,
Month, Year, Day of Week, and Day of Year.
• Dedicated 32 kHz oscillator or programmable prescaler
from APB clock.
• Dedicated power supply pin can be connected to a
battery or to the main 3.3 V.
Description
• RTC is a set of counters which measure time
• Works when system power is on, and optionally
when it is off
• clocked by
– a separate 32.768 KHz oscillator or
– programmable prescale divider based
• powered by
– own power supply pin, VBAT or
– 3.3 V supply used by the device.
Architecture
Real Time Clock (RTC) register map

1 ILR Interrupt Location Register


2 CTC Clock Tick Counter
3 CCR Clock Control Register
4 CIIR Counter Increment Interrupt Register
5 AMR Alarm Mask Register
6 CTIME0 Consolidated Time Register 0
7 CTIME1 Consolidated Time Register 1
8 CTIME2 Consolidated Time Register 2
RTC register map…

9 SEC Seconds Counter


10 MIN Minutes Register
11 HOUR 5 Hours Register
12 DOM Day of Month Register
13 DOW Day of Week Register
14 DOY Day of Year Register
15 MONTH Months Register
16 YEAR Years
17 ALSEC Alarm value for for Seconds
18 ALMIN Alarm value for Minutes
RTC register map…

19 ALDOM Alarm value for Day of Month


20 ALDOW Alarm value for Day of Week
21 ALDOY Alarm value for Day of Year
22 ALMON Alarm value for Months
23 ALYEAR Alarm value for year
24 PREINT Prescaler value, integer portion
25 PREFRAC Prescaler value, fractional portion
Clock Tick Counter Register

15 14:1 0

Reserved Clock Tick Counter Reserved

Prior to the
Seconds counter,
the CTC counts
32,768 clocks per
second
Clock Control Register
7:5 4 3:2 1 0
- CLKSRC CTTEST CTCRST CLKEN
Reserved If this bit is 0, Test Enable. CTC Reset. Clock Enable.
the Clock Tick These bits When one, the When this bit is
Counter takes should always elements in the a one the time
its clock from be zero during Clock Tick counters are
the Prescaler normal Counter are enabled.
If this bit is operation reset. The When it is a
1, the CTC elements zero, they are
takes its clock remain reset disabled so
from the 32 until CCR[1] is that they may
kHz oscillator changed to be initialized
that’s zero.
connected to
the RTCX1 and
RTCX2 pins

You might also like