Prescaler Integer Register (Preint - 0Xe002 4080); Prescaler Fraction Register (Prefrac - 0Xe002 4084); Example Of Prescaler Usage; User Manual - Philips LPC2101 User Manual

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
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:
Table 197: Reference clock divider registers
Name
PREINT
PREFRAC 15

17.6.1 Prescaler Integer register (PREINT - 0xE002 4080)

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 198: Prescaler Integer register (PREINT - address 0xE002 4080) bit description
Bit
12:0
15:13

17.6.2 Prescaler Fraction register (PREFRAC - 0xE002 4084)

This is the fractional portion of the prescale value, and may be calculated as:
PREFRAC = PCLK − ((PREINT + 1) × 32768).
Table 199: Prescaler Integer register (PREFRAC - address 0xE002 4084) bit description
Bit
14:0
15

17.6.3 Example of prescaler usage

In a simplistic case, the PCLK frequency is 65.537 kHz. So:
PREINT = int (PCLK / 32768) − 1 = 1 and
PREFRAC = PCLK - ([PREINT + 1] × 32768) = 1
With this prescaler setting, exactly 32,768 clocks per second will be provided to the RTC
by counting 2 PCLKs 32,767 times, and 3 PCLKs once.
In a more realistic case, the PCLK frequency is 10 MHz. Then,

User manual

1. For frequencies that are expected to be supported by the LPC2101/02/03, 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 × 8192).
2. The remainder value could be as large as 32,767, which requires 15 bits.
Size
Description
13
Prescale Value, integer portion
Prescale Value, fractional portion
Symbol
Prescaler Integer Contains the integer portion of the RTC prescaler value.
-
Symbol
Prescaler Fraction Contains the integer portion of the RTC prescaler value.
-
Rev. 01 — 12 January 2006
Description
Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.
Description
Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.
UM10161
Chapter 17: RTC
Access
Address
R/W
0xE002 4080
R/W
0xE002 4084
© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
Reset
value
0
NA
Reset
value
0
NA
221

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2103Lpc2102

Table of Contents