|
|
#define | DL_SYSTICK_config(x) SysTick_Config(x) |
| | Redirects DL_SYSTICK_config to CMSIS standard SysTick_Config.
|
| |
Overview
SysTick is a simple timer that is part of the Cortex-M architecture. Its intended purpose is to provide a periodic interrupt for an RTOS, but it can be used for other simple timing purposes.
§ DL_SYSTICK_init()
| __STATIC_INLINE void DL_SYSTICK_init |
( |
uint32_t |
period | ) |
|
Initializes the System Tick Timer (SysTick)
Initializes the System Tick Timer by configuring the desired period. Resets the counter so that, once enabled, the SysTick starts counting from 0. Does not start the timer or enable the interrupt.
- Parameters
-
| [in] | period | The period in ticks for the SysTick to fire. Value between 0x00000002 - 0x01000000. |
§ DL_SYSTICK_setPeriod()
| __STATIC_INLINE void DL_SYSTICK_setPeriod |
( |
uint32_t |
period | ) |
|
Set the period for the SysTick.
Calling this function does not cause the SysTick counter to reload immediately. If you want to change the period and reset the counter use the DL_SYSTICK_init function or DL_SYSTICK_resetValue.
- Parameters
-
| [in] | period | The period in ticks for the SysTick to fire. Value between 0x00000002 - 0x01000000. |
§ DL_SYSTICK_resetValue()
| __STATIC_INLINE void DL_SYSTICK_resetValue |
( |
void |
| ) |
|
Reset the current value of the SysTick.
Resets the current value of the SysTick back to 0, essentially resetting the period.
§ DL_SYSTICK_getPeriod()
| __STATIC_INLINE uint32_t DL_SYSTICK_getPeriod |
( |
void |
| ) |
|
Get the period for the SysTick.
- Returns
- The period in ticks for the SysTick to fire
- Return values
-
| Value | between 0x00000002 - 0x01000000. |
§ DL_SYSTICK_getValue()
| __STATIC_INLINE uint32_t DL_SYSTICK_getValue |
( |
void |
| ) |
|
Get the current value of SysTick counter.
- Returns
- The current value of the counter in ticks
- Return values
-
| Value | between 0x00000000 - 0x00FFFFFF. |
§ DL_SYSTICK_enable()
| __STATIC_INLINE void DL_SYSTICK_enable |
( |
void |
| ) |
|
Enable the SysTick, starts counting once enabled.
Once enabled, the SysTick will start counting from whatever value it was disabled with. To ensure a full period, use DL_SYSTICK_init or DL_SYSTICK_resetValue before enabling.
§ DL_SYSTICK_isEnabled()
| __STATIC_INLINE bool DL_SYSTICK_isEnabled |
( |
void |
| ) |
|
Checks if the SysTick is enabled.
- Returns
- Returns the enabled status of the SysTick
- Return values
-
| true | The SysTick is enabled and counting |
| false | The SysTick is disabled and not counting |