timer

As said before, I will explore the Timer and Counter of STM32F0 using CubeMX in this post. In this STM32F0 timer tutorial, I will try to cover as many functions of the STM32F0’s Timer as possible because this peripheral may have the greatest features, functions among the other peripherals. If you have worked with Arduino before, you might realize the limitation in function of those arduino’s timers. However , the STM32’s timers will give you way more functions that will be very useful for many of your applications that you may not think about it before. For STM32F051, it has totally 9 main timers including 7 16-bit timers, 1 24-bit systick timer and 1 32-bit timer. Some of them have 6 channels advanced-control PWM output, deadtime generation… It also has independent and watchdog timer for dealing with program hanging. This tutorial will cover the following function of the timer:

  • Time base interrupt function
  • Counter with external input
  • Input capture
  • PWM generation

Read More →