CC23x0R5DriverLibrary
|
Functions | |
__STATIC_INLINE void | SysTickEnable (void) |
Enables the SysTick counter. More... | |
__STATIC_INLINE void | SysTickDisable (void) |
Disables the SysTick counter. More... | |
__STATIC_INLINE void | SysTickRegisterInt (void(*pfnHandler)(void)) |
Registers an interrupt handler for the SysTick interrupt in the dynamic interrupt table. More... | |
__STATIC_INLINE void | SysTickUnregisterInt (void) |
Unregisters the interrupt handler for the SysTick interrupt in the dynamic interrupt table. More... | |
__STATIC_INLINE void | SysTickEnableInt (void) |
Enables the SysTick interrupt. More... | |
__STATIC_INLINE void | SysTickDisableInt (void) |
Disables the SysTick interrupt. More... | |
__STATIC_INLINE void | SysTickSetPeriod (uint32_t period) |
Sets the period of the SysTick counter. More... | |
__STATIC_INLINE uint32_t | SysTickGetPeriod (void) |
Gets the period of the SysTick counter. More... | |
__STATIC_INLINE uint32_t | SysTickGetValue (void) |
Gets the current value of the SysTick counter. More... | |
The system CPU includes a system timer, SysTick, integrated in the NVIC which provides a simple, 24-bit, clear-on-write, decrementing, wrap-on-zero counter with a flexible control mechanism. When enabled, the timer counts down on each clock from the reload value to 0, reloads (wraps) on the next clock edge, then decrements on subsequent clocks.
The SysTick counter runs on the system clock. If this clock signal is stopped for low-power mode, the SysTick counter stops.
When the processor is halted for debugging, the counter does not decrement.
The API functions can be grouped like this:
Configuration and status:
Enable and disable:
Interrupt configuration:
__STATIC_INLINE void SysTickEnable | ( | void | ) |
Enables the SysTick counter.
This will start the SysTick counter. If an interrupt handler has been registered, it will be called when the SysTick counter rolls over.
References HWREG, SYSTICK_BASE, SYSTICK_CSR_CLKSOURCE, SYSTICK_CSR_ENABLE, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickDisable | ( | void | ) |
Disables the SysTick counter.
This will stop the SysTick counter. If an interrupt handler has been registered, it will no longer be called until SysTick is restarted.
References HWREG, SYSTICK_BASE, SYSTICK_CSR_ENABLE, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickRegisterInt | ( | void(*)(void) | pfnHandler | ) |
Registers an interrupt handler for the SysTick interrupt in the dynamic interrupt table.
This function registers a function as the interrupt handler for a specific interrupt and enables the corresponding interrupt in the interrupt controller.
pfnHandler | is a pointer to the function to be called when the SysTick interrupt occurs. |
References HWREG, INT_SYSTICK, IntRegister(), SYSTICK_BASE, SYSTICK_CSR_TICKINT, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickUnregisterInt | ( | void | ) |
Unregisters the interrupt handler for the SysTick interrupt in the dynamic interrupt table.
This function will clear the handler to be called when a SysTick interrupt occurs.
References HWREG, INT_SYSTICK, IntUnregister(), SYSTICK_BASE, SYSTICK_CSR_TICKINT, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickEnableInt | ( | void | ) |
Enables the SysTick interrupt.
This function will enable the SysTick interrupt, allowing it to be reflected to the processor.
References HWREG, SYSTICK_BASE, SYSTICK_CSR_TICKINT, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickDisableInt | ( | void | ) |
Disables the SysTick interrupt.
This function will disable the SysTick interrupt, preventing it from being reflected to the processor.
References HWREG, SYSTICK_BASE, SYSTICK_CSR_TICKINT, and SYSTICK_O_CSR.
__STATIC_INLINE void SysTickSetPeriod | ( | uint32_t | period | ) |
Sets the period of the SysTick counter.
This function sets the rate at which the SysTick counter wraps; this equals to the number of processor clocks between interrupts.
period
supplied here on the next clock after the SysTick is enabled.period | is the number of clock ticks in each period of the SysTick counter; must be between 1 and 16,777,216 (0x1000000), both included. |
References ASSERT, HWREG, SYSTICK_BASE, and SYSTICK_O_RVR.
__STATIC_INLINE uint32_t SysTickGetPeriod | ( | void | ) |
Gets the period of the SysTick counter.
This function returns the rate at which the SysTick counter wraps; this equals to the number of processor clocks between interrupts.
References HWREG, SYSTICK_BASE, and SYSTICK_O_RVR.
__STATIC_INLINE uint32_t SysTickGetValue | ( | void | ) |
Gets the current value of the SysTick counter.
This function returns the current value of the SysTick counter; this will be a value between the (period - 1) and zero, both included.
References HWREG, SYSTICK_BASE, and SYSTICK_O_CVR.