UM11029
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
437 of 515
NXP Semiconductors
UM11029
Chapter 25: LPC84x System tick timer (SysTick)
25.6.4 System Timer Calibration value register
The value of the SYST_CALIB register is driven by the value of the SYSTCKCAL register
in the system configuration block SYSCON (see
).
25.7 Functional description
The SysTick timer is a 24-bit timer that counts down to zero and generates an interrupt.
The intent is to provide a fixed 10 millisecond time interval between interrupts. The
SysTick timer is clocked from the CPU clock (the system clock, see
) or from the
reference clock, which is fixed to half the frequency of the CPU clock. In order to generate
recurring interrupts at a specific interval, the SYST_RVR register must be initialized with
the correct value for the desired interval. A default value is provided in the SYST_CALIB
register and may be changed by software.
25.7.1 Example timer calculation
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 system clock set to 20 MHz.
Example (system clock = 20 MHz)
The system tick clock = system clock = 20 MHz. Bit CLKSOURCE in the SYST_CSR
register set to 1 (system clock).
RELOAD = (system tick clock frequency
10 ms)
1 = (20 MHz
10 ms)
1 = 200000
1
= 199999 = 0x00030D3F.
Table 437. System Timer Calibration value register (SYST_CALIB, 0xE000 E01C) bit
description
Bit
Symbol
Value
Description
Reset
value
23:0
TENMS
0x4
29:24
-
Reserved, user software should not write ones to
reserved bits. The value read from a reserved bit is not
defined.
NA
30
SKEW
See
0
31
NOREF
0