
M0A21/M0A23 Series
May 06, 2022
Page
151
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
6.2.13 System Timer (SysTick)
The Cortex
®
-M0 includes an integrated system timer, SysTick, which provides a simple, 24-bit clear-on-
write, decrementing, wrap-on-zero counter with a flexible control mechanism. The counter can be used
as a Real Time Operating System (RTOS) tick timer or as a simple counter.
When system timer is enabled, it will count down from the value in the SysTick Current Value Register
(SYST_VAL) to zero, and reload (wrap) to the value in the SysTick Reload Value Register
(SYST_LOAD) on the next clock cycle, and then decrement on subsequent clocks. When the counter
transitions to zero, the COUNTFLAG status bit is set. The COUNTFLAG bit clears on reads.
The SYST_VAL value is UNKNOWN on reset. Software should write to the register to clear it to zero
before enabling the feature. This ensures the timer will count from the SYST_LOAD value rather than
an arbitrary value when it is enabled.
If the SYST_LOAD is zero, the timer will be maintained with a current value of zero after it is reloaded
with this value. This mechanism can be used to disable the feature independently from the timer enable
bit.
For more detailed information, please refer to the “Arm
®
Cortex
®
-M0
Technical Reference Manual” and
“Arm
®
v6-
M Architecture Reference Manual”.