aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/f1/obldc-strip/can/can.c
diff options
context:
space:
mode:
authorFelix Ruess2013-02-19 19:22:49 +0100
committerFelix Ruess2013-02-19 19:22:49 +0100
commit3ef44bff54e6f5e94b89bbd8afb5243075b668a0 (patch)
tree4b241454e0ffad662d9101871a0d3521e2c5f215 /examples/stm32/f1/obldc-strip/can/can.c
parent46263e90b41abd26d3b274a315d2237308db91a4 (diff)
[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
Diffstat (limited to 'examples/stm32/f1/obldc-strip/can/can.c')
-rw-r--r--examples/stm32/f1/obldc-strip/can/can.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/stm32/f1/obldc-strip/can/can.c b/examples/stm32/f1/obldc-strip/can/can.c
index a64bab5..b295486 100644
--- a/examples/stm32/f1/obldc-strip/can/can.c
+++ b/examples/stm32/f1/obldc-strip/can/can.c
@@ -75,7 +75,8 @@ void systick_setup(void)
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
/* 8000000/8000 = 1000 overflows per second - every 1ms one interrupt */
- systick_set_reload(8000);
+ /* SysTick interrupt every N clock pulses: set reload to N-1 */
+ systick_set_reload(7999);
systick_interrupt_enable();