1 /* ################################## SysTick function ###################################### */
3 \defgroup SysTick_gr Systick Timer (SYSTICK)
4 \brief Initialize and start the SysTick timer.
6 The System Tick Time (SysTick) generates interrupt requests on a regular basis.
7 This allows an OS to carry out context switching to support multiple tasking. For applications
8 that do not require an OS, the SysTick can be used for time keeping, time measurement, or as an
9 interrupt source for tasks that need to be executed regularly.
12 \section SysTick_code_ex_sec Code Example
13 The code below shows the usage of the function SysTick_Config() with an LPC1700.
18 uint32_t msTicks = 0; /* Variable to store millisecond ticks */
21 void SysTick_Handler(void) { /* SysTick interrupt Handler.
22 msTicks++; See startup file startup_LPC17xx.s for SysTick vector */
29 returnCode = SysTick_Config(SystemCoreClock / 1000); /* Configure SysTick to generate an interrupt every millisecond */
31 if (returnCode != 0) { /* Check return code for errors */
43 /**************************************************************************************************/
44 /** \brief System Tick Timer Configuration
46 Initialises and starts the System Tick Timer and its interrupt.
47 After this call, the SysTick timer creates interrupts with the specified time interval.
48 Counter is in free running mode to generate periodical interrupts.
50 \param [in] ticks Number of ticks between two interrupts
56 When <b>\#define __Vendor_SysTickConfig</b> is set to 1, the standard function <b>SysTick_Config</b>
57 is excluded. In this case, the file <b><i>device</i>.h</b> must contain a
58 vendor specific implementation of this function.
60 uint32_t SysTick_Config(uint32_t ticks);