Friday , October 10 2025

VN21 – ARM Programming – KEIL – STM32CubeMX – STM32F4 – Timer – 5

VN21 (Video No:21) This video is about, (Hal lib V2.11.0) while working with STM32CubeMX and STM32F4 discovery board, how to do Timer processes? What are PWM mode, Fast PWM and how to use them?

<<Video>> Watch
<<Source Code>> Download

Notes;

  • At first, determine PWM resolution in the PWM processes such as 100 steps, 200 steps, 300 steps.
  • Determine PWM frequency such as 50Hz, 1kHz, 4kHz.
  • Counter register (ARR) value is taken same as the value of PWM resolution.
  • Required Duty cycle is obtained with Pulse value.
  • Fast PWM mode has twice higher frequency than normal PWM mode.
  • TIM_clk = APBx_TIM_clk / (Prescaler+1)
  • TIM_freq = TIM_clk / (ARR+1)
  • Duty_cycle(%) = (CCRx / ARR)x100

Check Also

VN39 – Stm32f4 HC06 Wireless Configuration

VN39 (Video No:39) Hal lib V2.11.0, STM32CubeMX – Keil and STM32F4, In this video I …