@ -16,7 +16,8 @@ void timerActivateBus(timerNo_t timer)
void timerEnableTimer(timerNo_t timer)
{
BASE->CR1 &= ~0x01; //all the timers have the same CEN bit in CR1 register pos 0
//BASE->CR1 &= ~0x01; //all the timers have the same CEN bit in CR1 register pos 0
BASE->CR1 |= 0x01; //all the timers have the same CEN bit in CR1 register pos 0
}
void timerSetClkSource(timerNo_t timer, clkSources_t clk)
@ -16,8 +16,8 @@ int main(int argc, char *argv[])
delayInitMs(8000000, 1000);
timerActivateBus(timer_2);
timerSetPrescaler(timer_2, 1599);
timerSetAutoReload(timer_2, 9999);
timerSetPrescaler(timer_2, 159);
timerSetAutoReload(timer_2, 999);
timerClearCounter(timer_2);
timerEnableTimer(timer_2);