SysTick interrupt application [SysTick for STM32]
This is an application for interrupts using the SysTick timer provided in the ARM core without using peripherals.
This is a program for blinking LEDs using Systick interrupts.
The Systick timer generates an interrupt every second to switch the LED on and off.
This program generates and processes interrupts using the system clock of 72 MHz divided by 8 as a systick timer.
Within the interrupt handler SysTick_Handler, the program simply switches the toggle flag. In the main program, the output LED is switched according to the state of the toggle flag.
Setting Specification:
Output:PA5 Push-pull output+500Ω+LED
SysTick interrupt
SysTick interrupts can only be used in environments that do not use FreeRTOS, since FreeRTOS itself already uses SysTick for OS timers. The development environment on this site is configured to use FreeRTOS, so FreeRTOS must be disabled if SysTick interrupts are to be used.
Select "Project" - "Properties" - "C/C++ General" - "Paths and Symbols" - "Source Location" tab. …temporarily remove the path to the \Source folder and disable FreeRTOS. Even if the app program does not contain any FreeRTOS-related header files, SysTick will apparently interfere with FreeRTOS and not work if this path is followed.
Alternatively, in FreeRTOSConfig.h in the "Source" folder, comment out the rewrite of the system interrupt handler name for FreeRTOS (three lines:(SVC_Handler/PendSV_Handler/SysTic_Handler)