English
Language : 

900844 Datasheet, PDF (44/118 Pages) Freescale Semiconductor, Inc – Integrated Power Management IC for Ultra-mobile and Embedded Applications
FUNCTIONAL DEVICE OPERATION
CLOCK GENERATION AND REAL TIME CLOCK (RTC)
Features
The RTC module includes the following features:
• Counts seconds, minutes, and hours of the day
• Counts days of the week, date, month, and year
• Binary or BCD representation of time, calendar, and alarm
• 12 or 24 hour clock with AM and PM in 12 hour mode
• Automatic leap year compensation
• Automatic end of month recognition
• 15 bytes of clock, calendar, RTC control, and coin cell registers
• Two interrupts are separately software maskable and testable
• Time-of-day Alarm
• End-of-clock update cycle interrupt
• 15-bit counter to generate 1.0 Hz RTC clock
• Software testable Valid-ram-and-time status bit indicates data integrity
MODES OF OPERATION
Normal mode
In Normal mode, the RTC module updates time and calendar registers using the internal 1.0 Hz RTC clock. Once per second,
the alarm registers are compared to the current time, and if enabled, an alarm interrupt will occur when the alarm time matches
the current time. During normal operation, all 14 bytes of RTC and coin cell battery registers can be read through the SPI
interface. Control register B may be updated to enable End-of-clock Update interrupts, alarm interrupts, or to put the RTC in Set
mode.
The coin cell charger register is available for R/W in normal mode.
Coin Cell mode
When the application is powered down, the RTC will continue to keep track of time using power provided by the coin cell
battery. Since the system SPI will be powered down during this time, there is no read or write access to the RTC registers in Coin
Cell mode.
Set mode
In Set mode, the clock and calendar updates are suspended, and the software may update the time, calendar, and alarm
registers. The time and calendar formats must match the formats specified by the DM and 12/24 format bits in RTC register B.
When the format bits are modified, all 14 time, calendar, and alarm registers must be updated in the specified format.
Scan/Test mode
Internal Test mode not available for the end application.
Setting the Time, Calendar, and Alarm
Before initializing the internal registers, the Set bit in Register B should be set to a "1" to prevent time/calendar updates from
occurring. Select the RTC data format by writing the appropriate values to the DM and 24/12 bits in Register B. This can all be
done simultaneously with one SPI write to register B.
Next, the program should initialize all 10 time, calendar, and alarm locations, in the format specified by Register B (binary or
BCD, 12 or 24 hour). All 10 time, calendar, and alarm bytes must use the same data mode, either binary or BCD. Both the alarm
hours, and the hours bytes must use the same hours format, either 12 or 24.
The Set bit may now be cleared to allow updates. Once initialized, the real-time clock makes all updates in the selected data
mode. The data mode (DM) cannot be changed without re-initializing the 10 data bytes.
The 24/12 bit in Register B establishes whether the hour locations represent 1-to-12 or 0-to-23. When the 12 hour format is
selected the high order bit of the hour bytes represents PM when it is a "1". The 24/12 bit cannot be changed without re-initializing
the hour and alarm-hour locations.
Table 18 shows the binary and BCD formats of the 10 time, calendar, and alarm locations.
900844
44
Analog Integrated Circuit Device Data
Freescale Semiconductor