/***************************************************************************//** * \file cy_systick.h * \version 1.70.1 * * Provides the API declarations of the SysTick driver. * ******************************************************************************** * \copyright * Copyright (c) (2016-2022), Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ #ifndef CY_SYSTICK_H #define CY_SYSTICK_H /** * \addtogroup group_arm_system_timer * \{ * 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. * * \section group_systick_configuration Configuration Considerations * * The \ref Cy_SysTick_Init() performs all required driver's initialization and enables the timer. The function accepts * two parameters: clock source \ref 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 \ref Cy_SysTick_Init() by calling * \ref Cy_SysTick_SetCallback(). * * Changing the SysTick clock source and/or its frequency will change the interrupt interval and therefore * \ref Cy_SysTick_SetReload() should be called to compensate for this change. * * \section group_systick_more_information 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). * * \section group_systick_changelog Changelog * *
Version | Changes | Reason for Change |
---|---|---|
1.70.1 | *Updated driver guards. * | Bug fixes. | *
1.70 | *Macro value change and enhancements. * | Bug fix and Enhancements. | *
1.60 | *Bug fix and Enhancements. * | Bug fix and Enhancements. | *
1.50 | *CAT1C, CAT1D devices support. * Updated Cy_SysTick_Init() to use Cy_SysInt_SetVector() API to register the callback function and removed invalid define CY_SYSTICK_IRQ_NUM. |
* Support for new devices. | *
1.40 | *Support for CM33. | *New devices support. | *
1.30 | *Added function parameter checks. | *Improved the debugging capability. | *
Minor documentation updates. | *Documentation enhancement. | *|
1.20 | *Updated Cy_SysTick_SetClockSource() for the PSoC 64 devices, * so that passing any other value than CY_SYSTICK_CLOCK_SOURCE_CLK_CPU * will not affect clock source and it will be as * \ref Cy_SysTick_GetClockSource() reports. | *Added PSoC 64 devices support. | *
Minor documentation updates. | *Documentation enhancement. | *|
1.10.1 | *Updated include files. | *Improve pdl usability. | *
1.10 | *Flattened the organization of the driver source code into the single * source directory and the single include directory. * | *Driver library directory-structure simplification. | *
Added register access layer. Use register access macros instead * of direct register access using dereferenced pointers. | *Makes register access device-independent, so that the PDL does * not need to be recompiled for each supported part number. | *|
1.0.1 | *Fixed a warning issued when the compilation of C++ source code was * enabled. | ** |
1.0 | *Initial version | ** |