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)
void systick_interrupt_enable(void)
void systick_set_clocksource(uint8_t clocksource)
uint32_t systick_get_calib(void)
bool systick_set_frequency(uint32_t freq, uint32_t ahb)
void systick_set_reload(uint32_t value)
void systick_counter_disable(void)
void systick_counter_enable(void)
uint32_t systick_get_reload(void)
uint32_t systick_get_value(void)
void systick_interrupt_disable(void)