[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:
@@ -62,7 +62,8 @@ int main(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();
|
||||
|
||||
|
||||
@@ -238,7 +238,8 @@ static void hid_set_config(usbd_device *usbd_dev, u16 wValue)
|
||||
#endif
|
||||
|
||||
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
|
||||
systick_set_reload(100000);
|
||||
/* SysTick interrupt every N clock pulses: set reload to N-1 */
|
||||
systick_set_reload(99999);
|
||||
systick_interrupt_enable();
|
||||
systick_counter_enable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user