====== System Tick Timer ======
The STM32F429ZI offers a 24 bit system tick timer. It is a simple down counter. \\
The system tick timer counts down from the reload value to zero and generates an interrupt. \\
\\ {{systick_complete.svg}} \\ \\
===== Registers =====
==== CTRL - Control and status register ====
\\ {{systick_reg_ctrl.svg}} \\ \\
|< 100% 5em 5em >|
|ENABLE|0|Systick timer disabled (reset state)|
|:::|1|Systick timer enabled|
|TICKINT|0|Systick interrupt disabled (reset state)|
|:::|1|Systick interrupt enabled|
|CLKSRC|0|Systick clock => fHCLK / 8 (reset state)|
|:::|1|Systick clock => fHCLK|
==== LOAD - Reload value register ====
\\ {{systick_reg_load.svg}} \\ \\
* Reload value of SysTick timer.
==== VAL - Current value register ====
\\ {{systick_reg_val.svg}} \\ \\
* Current value of SysTick timer.
===== Programming Example =====
#include "reg_stm32f4xx.h"
STK->CTRL = (0x3 << 1u); /* Set clock and interrupt. */
STK->LOAD = 84000u; /* Set reload value: 84 MHz / 84000 -> 1 ms. */
STK->CTRL |= (0x1 << 0u); /* Enable timer. */
void SysTick_Handler(void)
{
/* Handler for SysTick interrupt. */
}
\\