TIMERS explanation http://letanphuc.net/2015/06/stm32f0-timer-tutorial-and-counter-tutorial/