
Agere Systems Inc.
33
Data Sheet
July 2001
T8302 Internet Protocol Telephone
Advanced RISC Machine (
ARM
)
4 Reset/Clock Management
(continued)
The default values for
MBITS
and
NBITS
in this design are:
MBITS
= 24 (0x18) and
NBITS
= 0 (0x0).
To use the PLL clock the following steps should be taken by software:
I
Program
MBITS
and
NBITS
. Choose the
MBITS
and
NBITS
values in the
PLL control register
(see Table 12
on page 39)
by selecting the lowest value for
NBITS
and the appropriate value of
MBITS
required to obtain the
desired frequency of the internal clock.
I
The clock switching logic waits for the PLL to lock before switching to the PLL as the system clock. Any write to
the
PLL control register
(see Table 12 on page 39)
resets the lock flag and causes the clock switching logic to
switch to
EXT_CLK
.
I
The lock-in time depends on the operating frequency and the values programmed for
MBITS
and
NBITS
.
I
The frequency of the PLL output clock (
PLL_CLK
) should fall within the range defined in the data sheet. Change
the bits in the
PLL control register
(see Table 12 on page 39)
only while the PLL is not providing the internal
clock source.
I
To select PLL as the
SYS_CLK
, set
PLLC
in the
clock management register
(see Table 7 on page 37)
to 1.
I
To deselect PLL as the
SYS_CLK
, select another clock in the
clock management register
by setting either
CMRT
or
CMEC
to 1.
When an external interrupt is encountered while in WFI mode (
see Section 4.2.1 on page 35
), the system automat-
ically switches back to the last fast clock.
4.1.3 Latency
The switch between the
EXT_CLK
and
PLL_CLK
is synchronous. This causes the actual switching to take place
several cycles after the
PLLC
or the
CMEC
bit is changed. During this time, actual code is executed. The PLL is
not disabled until the
PLLE
bit in the
clock control register
(see Table 10 on page 38)
is set to 0. To find out when
the switching is complete, poll the
clock status register
(see Table 8 on page 37)
.
4.1.4 Real-Time Clock (RTC)
The real-time clock (
RTC_CLK
) defaults to a 32.768 kHz clock generated by a crystal oscillator connected at
XRTC0
and
XRTC1
. The input clock is divided by 32,768 to generate a clock with a one-second period that incre-
ments a 29-bit seconds counter. In addition, it can generate interrupts at a programmed time. Some features of the
RTC are:
I
17-year time interval with 1 second resolution.
I
Programmed time alarm interrupt.
I
Clock source selectable between
RTC_OSC_CLK
and
EXT_PROG_CLK
.
To use a real-time alarm interrupt, the following steps have to take place:
1.The clock source is selected. Either
RTC_OSC_CLK
or
EXT_PROG_CLK
.
2.The appropriate seconds value is loaded into the
RTC seconds alarm register
(see Table 18 on page 44)
.
3.The RTC clock interrupt is enabled in the
RTC interrupt enable register (
bit 0
AI ENA)
(see Table 22 on page 45)
.
4.The
RTC interrupt status register
bit
AI
(see Table 21 on page 45)
is set to 1 when the timer RTC alarm
expires.