Module used to configure/control the Cortex M4 SysTick. More...
Functions | |
void | SysTick_enableModule (void) |
void | SysTick_disableModule (void) |
void | SysTick_registerInterrupt (void(*intHandler)(void)) |
void | SysTick_unregisterInterrupt (void) |
void | SysTick_enableInterrupt (void) |
void | SysTick_disableInterrupt (void) |
void | SysTick_setPeriod (uint32_t period) |
uint32_t | SysTick_getPeriod (void) |
uint32_t | SysTick_getValue (void) |
Module used to configure/control the Cortex M4 SysTick.
The SysTick interrupt handler does not need to clear the SysTick interrupt source as it is cleared automatically by the NVIC when the SysTick interrupt handler is called.
Below is a very brief code example showing how to configure the SysTick module to interrupt periodically and blink an LED attached to P1.0.
void SysTick_enableModule | ( | 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.
void SysTick_disableModule | ( | 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.
void SysTick_registerInterrupt | ( | void(*)(void) | intHandler | ) |
Registers an interrupt handler for the SysTick interrupt.
intHandler | is 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.
References FAULT_SYSTICK, and Interrupt_registerInterrupt().
void SysTick_unregisterInterrupt | ( | void | ) |
Unregisters the interrupt handler for the SysTick interrupt.
This function unregisters the handler to be called when a SysTick interrupt occurs.
References FAULT_SYSTICK, and Interrupt_unregisterInterrupt().
void SysTick_enableInterrupt | ( | void | ) |
Enables the SysTick interrupt.
This function enables the SysTick interrupt, allowing it to be reflected to the processor.
void SysTick_disableInterrupt | ( | void | ) |
Disables the SysTick interrupt.
This function disables the SysTick interrupt, preventing it from being reflected to the processor.
void SysTick_setPeriod | ( | uint32_t | period | ) |
Sets the period of the SysTick counter.
period | is 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.
References ASSERT.
uint32_t SysTick_getPeriod | ( | 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.
uint32_t SysTick_getValue | ( | 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.