Time Base Settings
Prescaler Prescaler value
Period Autoreload value
Mode Counting direction
Clock division cares only about inputs to timer
Enable Start timer in init sequence
One Pulse Set One Pulse Mode
ARR Preload
Clear Flags Clears IRQ flags in init routine

Interrupt settings
IRQ Update Trigger Break COM Capture / Compare 1 Capture / Compare 2 Capture / Compare 3 Capture / Compare 4
DMA request
DMA Update Trigger Break COM Capture / Compare 1 Capture / Compare 2 Capture / Compare 3 Capture / Compare 4

Output compare
EnableModePolarityPulsepreload
Channel 1 Output channels
Channel 2 Output channels

Input Capture
UsePolaritySelectionPrescalerFilter
Channel 1
Channel 2

Another functions
Select Input Trigger Input in slave mode
Select Slave Mode
MSM bit Enable Delay at TRGI to perfect synchronisation
Deinit Deinitialize timer before setup

Encoder Interface
UseModeIC1 PolarityIC2 Polarity

annotations:
STM32F407
CH1 - PA2, PE5
CH2 - PA3, PE6
F407 at full speed 168MHz

home