
Contents AN4013
2/39 DocID022500 Rev 6
Contents
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 General-purpose timer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Clock input sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 Internal clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.2 External clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Time base generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Timer input capture mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Timer output compare mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 Timer PWM mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6 Timer one pulse mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7 Timer Asymmetric PWM mode available for
STM32L4/F7 Series and STM32F30x/F3x8 lines . . . . . . . . . . . . . . . . . . 15
2.8 Timer combined PWM mode available for
STM32L4/F7 Series and STM32F30x/F3x8 lines . . . . . . . . . . . . . . . . . . 17
2.9 Retriggerable one pulse mode available for
STM32L4/F7 Series and STM32F30x/F3x8 lines . . . . . . . . . . . . . . . . . . 18
3 Timer synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1 Timer system link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Master configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Slave configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4 Advanced features for motor control . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1 Signal generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Combined three-phase PWM mode available for
STM32L4/F7 Series and STM32F30x/F3x8 lines . . . . . . . . . . . . . . . . . . 25
4.3 Specific features for motor control applications . . . . . . . . . . . . . . . . . . . . 26
4.3.1 Complementary signal and dead time feature . . . . . . . . . . . . . . . . . . . . 26
4.3.2 Break input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.3 Locking mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.4 Specific features for feedback measurement . . . . . . . . . . . . . . . . . . . . . 29
5 High-resolution timer applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33