[cm3] fix doxygen for systick_get_value, add systick_get_reload
Fix the reload value in the examples: to get a SysTick interrupt every N clock pulses: set reload to N-1 see http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/BGBEEJHC.html#BABGACGG
This commit is contained in:
@@ -79,7 +79,8 @@ void systick_setup(void)
|
||||
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
|
||||
|
||||
/* 9000000/9000 = 1000 overflows per second - every 1ms one interrupt */
|
||||
systick_set_reload(9000);
|
||||
/* SysTick interrupt every N clock pulses: set reload to N-1 */
|
||||
systick_set_reload(8999);
|
||||
|
||||
systick_interrupt_enable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user