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 */
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);
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
}