Driverlib SYSTICK API

Module: Driverlib (AM13E232X) APIs

More…

Functions

Name

__STATIC_INLINE void

DL_SYSTICK_init(uint32_t period)
Initializes the System Tick Timer (SysTick)

__STATIC_INLINE void

DL_SYSTICK_setPeriod(uint32_t period)
Set the period for the SysTick.

__STATIC_INLINE void

DL_SYSTICK_resetValue(void )
Reset the current value of the SysTick.

__STATIC_INLINE uint32_t

DL_SYSTICK_getPeriod(void )
Get the period for the SysTick.

__STATIC_INLINE uint32_t

DL_SYSTICK_getValue(void )
Get the current value of SysTick counter.

__STATIC_INLINE void

DL_SYSTICK_enableInterrupt(void )
Enable the SysTick interrupt.

__STATIC_INLINE void

DL_SYSTICK_disableInterrupt(void )
Disable the SysTick interrupt.

__STATIC_INLINE void

DL_SYSTICK_enable(void )
Enable the SysTick, starts counting once enabled.

__STATIC_INLINE void

DL_SYSTICK_disable(void )
Disable the SysTick, stops counting once disabled.

__STATIC_INLINE bool

DL_SYSTICK_isEnabled(void )
Checks if the SysTick is enabled.

Defines

Name

DL_SYSTICK_config(x)
Redirects DL_SYSTICK_config to CMSIS standard SysTick_Config.

Detailed Description

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.

Functions Documentation

function DL_SYSTICK_init

__STATIC_INLINE void DL_SYSTICK_init(
    uint32_t period
)

Initializes the System Tick Timer (SysTick)

Parameters:

  • period The period in ticks for the SysTick to fire. Value between 0x00000002 - 0x01000000.

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.

function DL_SYSTICK_setPeriod

__STATIC_INLINE void DL_SYSTICK_setPeriod(
    uint32_t period
)

Set the period for the SysTick.

Parameters:

  • period The period in ticks for the SysTick to fire. Value between 0x00000002 - 0x01000000.

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.

function 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.

function DL_SYSTICK_getPeriod

__STATIC_INLINE uint32_t DL_SYSTICK_getPeriod(
    void 
)

Get the period for the SysTick.

Returns:

  • Value between 0x00000002 - 0x01000000.

Return: The period in ticks for the SysTick to fire

function DL_SYSTICK_getValue

__STATIC_INLINE uint32_t DL_SYSTICK_getValue(
    void 
)

Get the current value of SysTick counter.

Returns:

  • Value between 0x00000000 - 0x00FFFFFF.

Return: The current value of the counter in ticks

function DL_SYSTICK_enableInterrupt

__STATIC_INLINE void DL_SYSTICK_enableInterrupt(
    void 
)

Enable the SysTick interrupt.

function DL_SYSTICK_disableInterrupt

__STATIC_INLINE void DL_SYSTICK_disableInterrupt(
    void 
)

Disable the SysTick interrupt.

function 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.

function DL_SYSTICK_disable

__STATIC_INLINE void DL_SYSTICK_disable(
    void 
)

Disable the SysTick, stops counting once disabled.

function DL_SYSTICK_isEnabled

__STATIC_INLINE bool DL_SYSTICK_isEnabled(
    void 
)

Checks if the SysTick is enabled.

Returns:

  • true The SysTick is enabled and counting

  • false The SysTick is disabled and not counting

Return: Returns the enabled status of the SysTick

Macros Documentation

define DL_SYSTICK_config

#define DL_SYSTICK_config(
    x
)
SysTick_Config(x)

Redirects DL_SYSTICK_config to CMSIS standard SysTick_Config.