UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
139 of 258
NXP Semiconductors
UM10429
Chapter 15: LPC1102 System tick timer
15.7 Example timer calculations
To use the system tick timer, do the following:
1. Program the SYST_RVR register with the reload value RELOAD to obtain the desired
time interval.
2. Clear the SYST_CVR register by writing to it. This ensures that the timer will count
from the SYST_RVR value rather than an arbitrary value when the timer is enabled.
3. Program the SYST_SCR register with the value 0x7 which enables the SysTick timer
and the SysTick timer interrupt.
The following example illustrates selecting the SysTick timer reload value to obtain a
10 ms time interval with the LPC1102 system clock set to 50 MHz.
Example (system clock = 50 MHz)
The system tick clock =
system clock
⁄
2
= 25 MHz.
RELOAD = (system tick clock frequency
×
10 ms)
−
1 = (25 MHz
×
10 ms)
−
1 = 250000
−
1
= 249999 = 0x0003D08F