55#ifndef LIBOPENCM3_SYSTICK_H
56#define LIBOPENCM3_SYSTICK_H
66#define STK_CSR MMIO32(SYS_TICK_BASE + 0x00)
76#define STK_RVR MMIO32(SYS_TICK_BASE + 0x04)
83#define STK_CVR MMIO32(SYS_TICK_BASE + 0x08)
90#define STK_CALIB MMIO32(SYS_TICK_BASE + 0x0C)
101#define STK_CSR_COUNTFLAG (1 << 16)
103#define STK_CSR_CLKSOURCE_LSB 2
109#define STK_CSR_CLKSOURCE (1 << STK_CSR_CLKSOURCE_LSB)
115#if defined(__ARM_ARCH_6M__)
116#define STK_CSR_CLKSOURCE_EXT (0 << STK_CSR_CLKSOURCE_LSB)
117#define STK_CSR_CLKSOURCE_AHB (1 << STK_CSR_CLKSOURCE_LSB)
119#define STK_CSR_CLKSOURCE_AHB_DIV8 (0 << STK_CSR_CLKSOURCE_LSB)
120#define STK_CSR_CLKSOURCE_AHB (1 << STK_CSR_CLKSOURCE_LSB)
125#define STK_CSR_TICKINT (1 << 1)
127#define STK_CSR_ENABLE (1 << 0)
134#define STK_RVR_RELOAD 0x00FFFFFF
143#define STK_CVR_CURRENT 0x00FFFFFF
158#define STK_CALIB_NOREF (1 << 31)
165#define STK_CALIB_SKEW (1 << 30)
173#define STK_CALIB_TENMS 0x00FFFFFF
uint8_t systick_get_countflag(void)
SysTick Read the Counter Flag.
void systick_interrupt_enable(void)
Enable SysTick Interrupt.
void systick_set_clocksource(uint8_t clocksource)
Set the SysTick Clock Source.
void systick_clear(void)
SysTick Clear counter Value.
uint32_t systick_get_calib(void)
SysTick Get Calibration Value.
bool systick_set_frequency(uint32_t freq, uint32_t ahb)
SysTick Set clock and frequency of overflow.
void systick_set_reload(uint32_t value)
SysTick Set the Automatic Reload Value.
void systick_counter_disable(void)
Disable SysTick Counter.
void systick_counter_enable(void)
Enable SysTick Counter.
uint32_t systick_get_reload(void)
SysTick Read the Automatic Reload Value.
uint32_t systick_get_value(void)
Get the current SysTick counter value.
void systick_interrupt_disable(void)
Disable SysTick Interrupt.