altos/stmf0: Make sure systick is off before programming
authorKeith Packard <keithp@keithp.com>
Fri, 28 Apr 2017 07:04:14 +0000 (00:04 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 28 Apr 2017 07:04:14 +0000 (00:04 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/stmf0/ao_timer.c

index 5c05e4f187c09017876b1dfd476ed6a9259e7e9d..50fd67b8517e6fc7119ad9225c140605e5d30f2a 100644 (file)
@@ -86,6 +86,7 @@ ao_timer_set_adc_interval(uint8_t interval)
 void
 ao_timer_init(void)
 {
+       stm_systick.csr = 0;
        stm_systick.rvr = SYSTICK_RELOAD;
        stm_systick.cvr = 0;
        stm_systick.csr = ((1 << STM_SYSTICK_CSR_ENABLE) |