Functional Description - Freescale Semiconductor MCF54455 Reference Manual

Table of Contents

Advertisement

Address: 0xFC03_C038 (RTC_GOCL)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Figure 28-13. RTC General Oscillator Clock Lower Register (RTC_GOCL)
Field
31–16
Reserved, must be cleared.
15–0
Lower word of RTC_GOC[31:0]; i.e. equal to RTC_GOC[15:0]. RTC_GOC, with the oscillator clock, determines
CNT_LOWER
the 1 Hz and sample frequencies. A value of 0 in RTC_GOC yields no 1 Hz signal. This register resets to 0.
28.4

Functional Description

The clock generation logic, using the incoming RTC oscillator clock and RTC_GOC value, creates a 1 Hz
signal which increments the seconds, minutes, hours, and days counters. The alarm functions, when
enabled, generate RTC interrupts when the time-of-day (TOD) settings reach programmed values. The
sampling timer generates fixed-frequency interrupts, and the minute stopwatch allows for efficient
interrupts on minute boundaries.
28.4.1
Clock Generation and Counter
The clock generation logic divides the reference clock by the value programmed into the RTC_GOC
register to obtain a 1 Hz signal. The RTC_GOC is a concatenation of the lower two bytes of the
RTC_GOCU and RTC_GOCL registers (RTC_GOCU[15:0] || RTC_GOCL[15:0]). For example:
With an RTC input clock of 32 kHz, set RTC_GOC to 0x0000_7D00 (32,000).
RTC_GOCU = 0x0000 and RTC_GOCL = 0x7D00.
With an RTC input clock of 48 kHz, set RTC_GOC to 0x0000_BB80 (48,000).
RTC_GOCU = 0x0000 and RTC_GOCL = 0xBB80.
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 RTC_SECONDS
The 6-bit minutes counter and the 5-bit hours counter are located in RTC_HOURMIN
The 16-bit day counter is located in RTC_DAYS
These counters cover a 24-hour clock over 65,536 days. All three registers can be read or written at any
time.
Interrupts signal when each of the four counters increments and can indicate when a counter rolls over. For
example, each tick of the seconds counter causes the 1HZ interrupt flag to set. When the seconds counter
rolls from 59 to 00, the minute counter increments and the MIN interrupt flag is set. The same is true for
the minute counter with the HR signal and the hour counter with the DAY signal.
Freescale Semiconductor
Table 28-14. RTC_GOCU Field Descriptions
Description
Real-Time Clock
Access: User read/write
8
7
6
5
4
3
2
1
CNT_LOWER
0
28-11

Advertisement

Table of Contents
loading

Table of Contents