[Stub] support.
Various system timer definitions.
DefinesFunctions
- SYSTICK_BASE
SysTick register map base pointer.
- SYSTICK_CSR_COUNTFLAG
- SYSTICK_CSR_CLKSOURCE
- SYSTICK_CSR_CLKSOURCE_EXTERNAL
- SYSTICK_CSR_CLKSOURCE_CORE
- SYSTICK_CSR_TICKINT
- SYSTICK_CSR_TICKINT_PEND
- SYSTICK_CSR_TICKINT_NO_PEND
- SYSTICK_CSR_ENABLE
- SYSTICK_CSR_ENABLE_MULTISHOT
- SYSTICK_CSR_ENABLE_DISABLED
- SYSTICK_CVR_NOREF
- SYSTICK_CVR_SKEW
- SYSTICK_CVR_TENMS
Variables
uint32 systick_uptime(void)Returns the system uptime, in milliseconds.
void systick_init(uint32 reload_val)Initialize and enable SysTick.
Clocks the system timer with the core clock, turns it on, and enables interrupts.
Parameters:
- reload_val -
Appropriate reload counter to tick every 1 ms.
void systick_disable()Clock the system timer with the core clock, but don’t turn it on or enable interrupt.
void systick_enable()Clock the system timer with the core clock and turn it on; interrupt every 1 ms, for systick_timer_millis.
uint32 systick_get_count(void)Returns the current value of the SysTick counter.
uint32 systick_check_underflow(void)Check for underflow.
This function returns 1 if the SysTick timer has counter to 0 since the last time it was called. However, any reads of any part of the SysTick Control and Status Register SYSTICK_BASE->CSR will interfere with this functionality. See the ARM Cortex M3 Technical Reference Manual for more details (e.g. Table 8-3 in revision r1p1).
- uint32 systick_uptime_millis
System elapsed time, in milliseconds.
class systick_reg_map
SysTick register map type.
Public Members
- __io uint32 CSR
Control and status register.
- __io uint32 RVR
Reload value register.
- __io uint32 CNT
Current value register (“count”).
- __io uint32 CVR
Calibration value register.