EasyManua.ls Logo

Philips LPC2194 - Reference Clock Divider (Prescaler)

Philips LPC2194
306 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Real Time Clock 253 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-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.
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.
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 189: Reference Clock Divider registers
Address Name Size Description Access
0xE0024080 PREINT 13 Prescale Value, integer portion R/W
0xE0024084 PREFRAC 15 Prescale Value, fractional portion R/W
Table 190: Prescaler Integer Register (PREINT - 0xE0024080)
PREINT Function Description
Reset
Value
15:13 Reserved
Reserved, user software should not write ones to reserved bits. The value
read from a reserved bit is not defined.
NA
12:0 Prescaler Integer Contains the integer portion of the RTC prescaler value. 0
Table 191: Prescaler Fraction Register (PREFRAC - 0xE0024084)
PREFRAC Function Description
Reset
Value
15 Reserved
Reserved, user software should not write ones to reserved bits. The value
read from a reserved bit is not defined.
NA
14:0 Prescaler Fraction Contains the fractional portion of the RTC prescaler value. 0

Table of Contents

Related product manuals