Real-Time Clock
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
8-2
•
Minute countdown timer with interrupt
•
Programmable daily alarm with interrupt
•
Once-per-day, once-per-hour, once-per-minute, and once-per-second interrupts
8.1.3
Modes of Operation
The incoming 1 Hz signal is used to increment the seconds, minutes, hours, and days TOD counters. The
alarm functions, when enabled, generate RTC interrupts when the TOD settings reach programmed values.
The sampling timer generates fixed-frequency interrupts, and the minute stopwatch allows for efficient
interrupts on minute boundaries.
•
Counter
The counter portion of the RTC module consists of four groups of counters that are physically
located in three registers:
— The 6-bit seconds counter is located in the SECONDS register
— The 6-bit minutes counter and the 5-bit hours counter are located in the HOURMIN register
— The 16-bit day counter is located in the DAYR register
•
Alarm
There are three alarm registers that mirror the three counter registers. An alarm is set by accessing
the real-time clock alarm registers (ALRM_HM, ALRM_SEC, and DAYALARM) and loading the
exact time that the alarm should generate an interrupt. When the TOD clock value and the alarm
value coincide, an interrupt occurs one half second later.
•
Minute Stopwatch
The minute stopwatch performs a countdown with a one minute resolution. It can be used to
generate an interrupt on a minute boundary.
8.2
Memory Map/Register Definition
The RTC module includes 10 32-bit registers.
summarizes these registers and their addresses.
Table 8-1. RTC Module Register Memory Map
IPSBAR Offset
Use
Access
0x03C0
RTC Hours and Minutes Counter Register (HOURMIN)
read/write
0x03C4
RTC Seconds Counter Register (SECONDS)
read/write
0x03C8
RTC Hours and Minutes Alarm Register (ALRM_HM)
read/write
0x03CC
RTC Seconds Alarm Register (ALRM_SEC)
read/write
0x03D0
RTC Control Register (RTCCTL)
read/write
0x03D4
RTC Interrupt Status Register (RTCISR)
read/write
0x03D8
RTC Interrupt Enable Register (RTCIENR)
read/write
0x03DC
Stopwatch Minutes Register (STPWCH)
read/write
0x03E0
RTC Days Counter Register (DAYS)
read/write
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60