English
Language : 

MC13783VKR2 Datasheet, PDF (21/50 Pages) Freescale Semiconductor, Inc – Power Management and Audio Circuit
4.1.2 Clock Generation and Real Time Clock
Functional Description
4.1.2.1 Clock Generation
The MC13783 generates a 32.768 kHz clock as well as several 32.768 kHz derivative clocks that are used
internally for control. In addition, a 32.768 kHz square wave is output to external pins.
4.1.2.1.1 Clocking Scheme
The MC13783 contains an internal RC oscillator powered from VATLAS that delivers a 32 kHz nominal
frequency (±20%) at its output when an external 32.768 kHz crystal is not present. The RC oscillator will
then be used to run the debounce logic, the PLL for the switchers, the real time clock (RTC) and internal
control logic, and can also be output on the CLK32K pin.
4.1.2.2 Real Time Clock
This section provides an overview of the Real Time Clock (RTC).
4.1.2.2.1 Time and Day Counters
The real time clock runs from the 32 kHz clock. This clock is divided down to a 1 Hz time tick which drives
a 17 bit time of day (TOD) counter. The TOD counter counts the seconds during a 24 hour period from 0
to 86,399 and will then roll over to 0. When the roll over occurs, it increments the 15-bit DAY counter. The
DAY counter can count up to 32767 days. The 1Hz time tick can be used to generate an 1HZI interrupt.
The 1HZI can be masked with corresponding 1HZM mask bit.
If the TOD and DAY registers are read at a point in time in which DAY is incremented, then care must be
taken that, if DAY is read first, DAY has not changed before reading TOD.
In order to guarantee stable TOD and DAY data, all SPI reads and writes to TOD and DAY data should
happen immediately after the 1HZI interrupt occurs. Alternatively, TOD or DAY readbacks could be
double-read and then compared to verify that they haven't changed. This requirement results from the fact
that the 32.768 kHz clock is completely independent of the SPI clock and the two cannot be synchronized.
4.1.2.2.2 Time of Day Alarm
A Time Of Day (TOD) alarm function can be used to turn on the phone and alert the processor. If the phone
is already on, the processor will be interrupted. The TODA and DAYA registers are used to set the alarm
time. When the TOD counter is equal to the value in TODA and the DAY counter is equal to the value in
DAYA, the TODAI interrupt will be generated.
MC13783 makes it convenient to schedule multiple daily events, where a single list could be used, or to
skip any number of days.
MC13783 Technical Data, Rev. 3.5
Freescale Semiconductor
21