Functions
Systick_api

Functions

void SysTickEnable (void)
 
void SysTickDisable (void)
 
void SysTickIntRegister (void(*pfnHandler)(void))
 
void SysTickIntUnregister (void)
 
void SysTickIntEnable (void)
 
void SysTickIntDisable (void)
 
void SysTickPeriodSet (uint32_t ui32Period)
 
uint32_t SysTickPeriodGet (void)
 
uint32_t SysTickValueGet (void)
 

Detailed Description

Function Documentation

§ SysTickEnable()

void SysTickEnable ( void  )

Enables the SysTick counter.

This function starts the SysTick counter. If an interrupt handler has been registered, it is called when the SysTick counter rolls over.

Note
Calling this function causes the SysTick counter to (re)commence counting from its current value. The counter is not automatically reloaded with the period as specified in a previous call to SysTickPeriodSet(). If an immediate reload is required, the NVIC_ST_CURRENT register must be written to force the reload. Any write to this register clears the SysTick counter to 0 and causes a reload with the supplied period on the next clock.
Returns
None.

References HWREG, NVIC_ST_CTRL, NVIC_ST_CTRL_CLK_SRC, and NVIC_ST_CTRL_ENABLE.

§ SysTickDisable()

void SysTickDisable ( void  )

Disables the SysTick counter.

This function stops the SysTick counter. If an interrupt handler has been registered, it is not called until SysTick is restarted.

Returns
None.

References HWREG, NVIC_ST_CTRL, and NVIC_ST_CTRL_ENABLE.

§ SysTickIntRegister()

void SysTickIntRegister ( void(*)(void)  pfnHandler)

Registers an interrupt handler for the SysTick interrupt.

Parameters
pfnHandleris a pointer to the function to be called when the SysTick interrupt occurs.

This function registers the handler to be called when a SysTick interrupt occurs.

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.

References FAULT_SYSTICK, HWREG, IntRegister(), NVIC_ST_CTRL, and NVIC_ST_CTRL_INTEN.

§ SysTickIntUnregister()

void SysTickIntUnregister ( void  )

Unregisters the interrupt handler for the SysTick interrupt.

This function unregisters the handler to be called when a SysTick interrupt occurs.

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.

References FAULT_SYSTICK, HWREG, IntUnregister(), NVIC_ST_CTRL, and NVIC_ST_CTRL_INTEN.

§ SysTickIntEnable()

void SysTickIntEnable ( void  )

Enables the SysTick interrupt.

This function enables the SysTick interrupt, allowing it to be reflected to the processor.

Note
The SysTick interrupt handler is not required to clear the SysTick interrupt source because it is cleared automatically by the NVIC when the interrupt handler is called.
Returns
None.

References HWREG, NVIC_ST_CTRL, and NVIC_ST_CTRL_INTEN.

§ SysTickIntDisable()

void SysTickIntDisable ( void  )

Disables the SysTick interrupt.

This function disables the SysTick interrupt, preventing it from being reflected to the processor.

Returns
None.

References HWREG, NVIC_ST_CTRL, and NVIC_ST_CTRL_INTEN.

§ SysTickPeriodSet()

void SysTickPeriodSet ( uint32_t  ui32Period)

Sets the period of the SysTick counter.

Parameters
ui32Periodis the number of clock ticks in each period of the SysTick counter and must be between 1 and 16,777,216, inclusive.

This function sets the rate at which the SysTick counter wraps, which equates to the number of processor clocks between interrupts.

Note
Calling this function does not cause the SysTick counter to reload immediately. If an immediate reload is required, the NVIC_ST_CURRENT register must be written. Any write to this register clears the SysTick counter to 0 and causes a reload with the ui32Period supplied here on the next clock after SysTick is enabled.
Returns
None.

References ASSERT, HWREG, and NVIC_ST_RELOAD.

§ SysTickPeriodGet()

uint32_t SysTickPeriodGet ( void  )

Gets the period of the SysTick counter.

This function returns the rate at which the SysTick counter wraps, which equates to the number of processor clocks between interrupts.

Returns
Returns the period of the SysTick counter.

References HWREG, and NVIC_ST_RELOAD.

§ SysTickValueGet()

uint32_t SysTickValueGet ( void  )

Gets the current value of the SysTick counter.

This function returns the current value of the SysTick counter, which is a value between the period - 1 and zero, inclusive.

Returns
Returns the current value of the SysTick counter.

References HWREG, and NVIC_ST_CURRENT.

Copyright 2018, Texas Instruments Incorporated