X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm%2Fao_timer.c;h=f3011d3f0e159097c71ce8c3e3f49443c98d070b;hp=f561e6b56851303d1af929c849acd0658e23dff8;hb=eea141b2f35722bad4cd31d9484d6d794646f815;hpb=31b42b99edbb976534ac432c07e218f13d1f5f9b diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c index f561e6b5..f3011d3f 100644 --- a/src/stm/ao_timer.c +++ b/src/stm/ao_timer.c @@ -87,7 +87,7 @@ ao_timer_init(void) stm_rcc.apb1enr |= (1 << STM_RCC_APB1ENR_TIM6EN); stm_tim6.psc = TIMER_10kHz; - stm_tim6.arr = 100; + stm_tim6.arr = 99; stm_tim6.cnt = 0; /* Enable update interrupt */ @@ -266,6 +266,7 @@ ao_clock_init(void) stm_rcc.csr |= (1 << STM_RCC_CSR_RMVF); +#if DEBUG_THE_CLOCK /* Output SYSCLK on PA8 for measurments */ stm_rcc.ahbenr |= (1 << STM_RCC_AHBENR_GPIOAEN); @@ -276,4 +277,5 @@ ao_clock_init(void) stm_rcc.cfgr |= (STM_RCC_CFGR_MCOPRE_DIV_1 << STM_RCC_CFGR_MCOPRE); stm_rcc.cfgr |= (STM_RCC_CFGR_MCOSEL_HSE << STM_RCC_CFGR_MCOSEL); +#endif }