User Manual

UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2010. All rights reserved.
User manual Rev. 2 — 19 August 2010 504 of 840
23.1 Basic configuration
The System Tick Timer is configured using the following registers:
1. Clock Source: Select either the internal CCLK or external STCLK (P3.26) clock as the
source in the STCTRL register.
2. Pins: If STCLK (P3.26) was selected as clock source enable the STCLK pin function
in the PINMODE register (Section 8.5
).
3. Interrupt: The System Tick Timer Interrupt is enabled in the NVIC using the
appropriate Interrupt Set Enable register.
23.2 Features
Times intervals of 10 milliseconds
Dedicated exception vector
Can be clocked internally by the CPU clock or by a clock input from a pin (STCLK)
23.3 Description
The System Tick Timer is an integral part of the Cortex-M3. The System Tick Timer is
intended to generate a fixed 10 millisecond interrupt for use by an operating system or
other system management software.
Since the System Tick Timer is a part of the Cortex-M3, it facilitates porting of software by
providing a standard timer that is available on Cortex-M3 based devices.
Refer to the Cortex-M3 User Guide appended to this manual (Section 34.4.4
) for details of
System Tick Timer operation.
23.4 Operation
The System Tick 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 System Tick Timer may be clocked either from the CPU clock or from the external pin
STCLK. The STCLK function shares pin P3.26 with other functions, and must be selected
for use as the System Tick Timer clock. In order to generate recurring interrupts at a
specific interval, the STRELOAD register must be initialized with the correct value for the
desired interval. A default value is provided in the STCALIB register and may be changed
by software. The default value gives a 10 millisecond interrupt rate if the CPU clock is set
to 100 MHz.
The block diagram of the System Tick Timer is shown below in the Figure 118
.
UM10360
Chapter 23: LPC17xx System Tick Timer
Rev. 2 — 19 August 2010 User manual