Reference Clock Divider (Prescaler) - Philips LPC2194 User Manual

Table of Contents

Advertisement

Philips Semiconductors
ARM-based Microcontroller

REFERENCE CLOCK DIVIDER (PRESCALER)

The reference clock divider (hereafter referred to as the Prescaler) allows generation of a 32.768 kHz reference clock from any
peripheral clock frequency greater than or equal to 65.536 kHz (2 x 32.768 kHz). This permits the RTC to always run at the proper
rate regardless of the peripheral clock rate. Basically, the Prescaler divides the peripheral clock (pclk) by a value which contains
both an integer portion and a fractional portion. The result is not a continuous output at a constant frequency, some clock periods
will be one pclk longer than others. However, the overall result can always be 32,768 counts per second.
The reference clock divider consists of a 13-bit integer counter and a 15-bit fractional counter. The reasons for these counter
sizes are as follows:
1. For frequencies that are expected to be supported by the LPC2119/2129/2194/2292/2294, a 13-bit integer counter is
required. This can be calculated as 160 MHz divided by 32,768 minus 1 = 4881 with a remainder of 26,624. Thirteen bits
are needed to hold the value 4881, but actually supports frequencies up to 268.4 MHz (32,768 x 8192).
2. The remainder value could be as large as 32,767, which requires 15 bits.
Table 189: Reference Clock Divider registers
Address
Name
0xE0024080
PREINT
0xE0024084
PREFRAC
Prescaler Integer Register (PREINT - 0xE0024080)
This is the integer portion of the prescale value, calculated as:
PREINT = int (pclk / 32768) - 1. The value of PREINT must be greater than or equal to 1.
Table 190: Prescaler Integer Register (PREINT - 0xE0024080)
PREINT
Function
15:13
Reserved
12:0
Prescaler Integer
Prescaler Fraction Register (PREFRAC - 0xE0024084)
This is the fractional portion of the prescale value, and may be calculated as:
PREFRAC = pclk - ((PREINT +1) x 32768).
x
Table 191: Prescaler Fraction Register (PREFRAC - 0xE0024084)
PREFRAC
Function
15
Reserved
14:0
Prescaler Fraction
Real Time Clock
Size
13
Prescale Value, integer portion
15
Prescale Value, fractional portion
Reserved, user software should not write ones to reserved bits. The value
read from a reserved bit is not defined.
Contains the integer portion of the RTC prescaler value.
Reserved, user software should not write ones to reserved bits. The value
read from a reserved bit is not defined.
Contains the fractional portion of the RTC prescaler value.
LPC2119/2129/2194/2292/2294
Description
Description
Description
253
Preliminary User Manual
Access
R/W
R/W
Reset
Value
NA
0
Reset
Value
NA
0
May 03, 2004

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2129Lpc2119Lpc2292Lpc2294

Table of Contents