Tuesday , November 4 2025

VN17 – ARM Programming – KEIL – STM32CubeMX – STM32F4 – Timer – 2

VN17 (Video No:17) In this video, (Hal lib V2.10.0) while working with STM32CubeMX and STM32F4 discovery board; how to do Timer processes? How to use External Clock? What are TI1, TI2, TIx, ETRx, ITRx pins and how to use them? How to make clock configuration? What is Master/Slave ?

<<Video>> Watch

Notes;

  • A synchronization occurs between External clock and APBx clock (D flip flop).
  • The relation between External clock and TIMclk frequencies; freq_TIMclk ≥ 3 x freq_ExternalSignal (TIMclk: Normal timer clock).
  • An important difference between ETR and TI1,TI2.. pins is that  ETR has prescaler. This feature provides to be that the signal frequency applied to ETR pin is higher than freq_TIMclk. Prescaler gets 2,4,8 values.
  • Timers are connected to each other internally with ITRx pins (Figure 1.).

   Figure 1. Timer internal trigger pin (ITRx) connections.

  • Example; When Timer 5 is Slave; if Timer 2 is Master, the trigger source of Timer 5 becomes ITR0 or if Timer 3 is Master, the trigger source of Timer 5 becomes ITR1 (Table 97.).

  • The process speed of the pins used for External clock should be taken into consideration (Low: 2MHz, Medium: 25MHz, High: 50MHz and Very High: 100MHz). If External signal frequency is higher than the process speed of used pin, it should be adjusted to a proper value.

Check Also

#6 – Receiving integer and floating values from serial port?

If we need to receive integer values from serial port, we can use “stdlib.h” as …