Cortex-M4 Peripherals
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
4-34
ID121610
Non-Confidential
When ENABLE is set to 1, the counter loads the RELOAD value from the SYST_RVR register
and then counts down. On reaching 0, it sets the COUNTFLAG to 1 and optionally asserts the
SysTick depending on the value of TICKINT. It then loads the RELOAD value again, and
begins counting.
4.4.2
SysTick Reload Value Register
The SYST_RVR register specifies the start value to load into the SYST_CVR register. See the
register summary in
for its attributes. The bit assignments are:
Calculating the RELOAD value
The RELOAD value can be any value in the range
0x00000001
-
0x00FFFFFF
. A start value of 0 is
possible, but has no effect because the SysTick exception request and COUNTFLAG are
activated when counting from 1 to 0.
The RELOAD value is calculated according to its use. For example, to generate a multi-shot
timer with a period of N processor clock cycles, use a RELOAD value of N-1. If the SysTick
interrupt is required every 100 clock pulses, set RELOAD to 99.
[2]
CLKSOURCE
Indicates the clock source:
0 = external clock
1 = processor clock.
[1]
TICKINT
Enables SysTick exception request:
0 = counting down to zero does not assert the SysTick exception request
1 = counting down to zero asserts the SysTick exception request.
Software can use COUNTFLAG to determine if SysTick has ever counted to zero.
[0]
ENABLE
Enables the counter:
0 = counter disabled
1 = counter enabled.
Table 4-33 SysTick SYST_CSR register bit assignments (continued)
Bits
Name
Function
31
0
RELOAD
Reserved
23
24
Table 4-34 SYST_RVR register bit assignments
Bits
Name
Function
[31:24]
-
Reserved.
[23:0]
RELOAD
Value to load into the SYST_CVR register when the counter is enabled and when it reaches 0, see
.