SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
The system tick timer (SysTick) is a tightly-coupled timer clocked by MCLK, which can be used for system time keeping. The SysTick is available in RUN and SLEEP modes but is not available for use in STOP, STANDBY, or SHUTDOWN modes.
The SysTick is configured through memory-mapped registers in the system private peripheral bus (PPB) region. See Table 3-8 for the list of SysTick configuration registers. The software development kit (SDK) provided with the devices supports the standard Arm Cortex Microcontroller Software Interface Standard (CMSIS) register access definitions for the SysTick.
The SysTick timer can be used in several different ways, including:
The SysTick timer is a simple 24-bit down counter, which counts down from its reload value to zero. Upon reaching zero, SysTick will re-load the value programmed into the reload value register (SYST_RVR) on the next clock cycle, and then again begin counting down to zero.
A SysTick event is generated when the SysTick counter reaches zero, and which point the COUNTFLAG status flag will be set. Reading the SYST_CSR register will clear the COUNTFLAG status bit. Writing to the current value register (SYST_CVR) clears the register and the COUNTFLAG status but does not generate an interrupt to the CPU. Reading SYST_CVR returns the counter value at time of access.
Address | Register | CMSIS | Description |
---|---|---|---|
0xE000.E010 | SYST_CSR | SysTick->CTRL | Control and status register, used to enable/disable SysTick and its related exception, and to check the COUNTFLAG status |
0xE000.E014 | SYST_RVR | SysTick->LOAD | Reload register used to program the counter reload value to set the SysTick interval in MCLK cycles |
0xE000.E018 | SYST_CVR | SysTick->VAL | Returns the current value of the SysTick counter; a write clears the counter to zero and clears COUNTFLAG in SYST_CSR |
0xE000.E01C | SYST_CALIB | SysTick->CALIB | Not implemented |
Application software must only use 32-bit word-aligned word accesses to the SysTick registers. To initialize the SysTick, follow the steps below: