PSOC E8XXGP Device Support Library
SysTick (Arm® System Timer)

General Description

Provides vendor-specific SysTick API.

The functions and other declarations used in this driver are in cy_systick.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.

The SysTick timer is part of the CPU. The timer is a down counter with a 24-bit reload/tick value that is clocked by the FastClk/SlowClk. The timer has the capability to generate an interrupt when the set number of ticks expires and the counter is reloaded. This interrupt is available as part of the Nested Vectored Interrupt Controller (NVIC) for service by the CPU and can be used for general-purpose timing control in user code.

The timer is independent of the CPU (except for the clock), which is useful in applications requiring precise timing that do not have a dedicated timer/counter available for the job.

Configuration Considerations

The Cy_SysTick_Init() performs all required driver's initialization and enables the timer. The function accepts two parameters: clock source cy_en_systick_clock_source_t and the timer interval. You must ensure the selected clock source for SysTick is enabled. The callbacks can be registered/unregistered any time after Cy_SysTick_Init() by calling Cy_SysTick_SetCallback().

Changing the SysTick clock source and/or its frequency will change the interrupt interval and therefore Cy_SysTick_SetReload() should be called to compensate for this change.

More Information

Refer to the SysTick section of the ARM reference guide for complete details on the registers and their use. See also the "CPU Subsystem (CPUSS)" chapter of the device technical reference manual (TRM).

API Reference

 Macros
 
 Functions
 
 Data Structures