General-purpose timers (TIM15/TIM16/TIM17)
tim_trgi
Counter
tim_ocx
29.4.20
UIF bit remapping
The IUFREMAP bit in the TIMx_CR1 register forces a continuous copy of the Update
Interrupt Flag UIF into bit 31 of the timer counter register (TIMxCNT[31]). This allows to
atomically read both the counter value and a potential roll-over condition signaled by the
UIFCPY flag. In particular cases, it can ease the calculations by avoiding race conditions
caused for instance by a processing shared between a background task (counter reading)
and an interrupt (Update Interrupt).
There is no latency between the assertions of the UIF and UIFCPY flags.
29.4.21
Timer input XOR function (TIM15 only)
The TI1S bit in the TIMx_CR2 register, allows the input filter of channel 1 to be connected to
the output of a XOR gate, combining the two input pins tim_ti1 and tim_ti2.
The XOR output can be used with all the timer input functions such as trigger or input
capture. It is useful for measuring the interval between the edges on two input signals, as
shown in
1338/2083
Figure 470. Retriggerable one pulse mode
Figure
471.
Figure 471. Measuring time interval between edges on 2 signals
TI1
TI2
TI1 XOR TI2
Counter
RM0440 Rev 1
RM0440
MSv62345V1
MS31400V1
Need help?
Do you have a question about the STM32G4 Series and is the answer not in the manual?