 Hello, and welcome to this presentation of the STM32F7 Low Power Timer, or LP-TIM. It covers the features of this peripheral, which offers a set of timing features and can generate waveforms even in low power modes. The low power timer peripheral embedded in the STM32F7 microcontroller provides a 16-bit timer that is able to run even in low power modes. This is made possible thanks to a flexible clocking scheme. The low power timer peripheral provides basic general-purpose timer functions with very low power consumption compared to other timers. One major function of the low power timer is its capability to keep running even when no internal clock source is active when configured in asynchronous counting mode. The low power timer's main feature is its ability to keep running in low power mode when almost all clock sources are turned off. The low power timer has a very flexible clocking scheme. It can be clocked from on-chip clock sources, LSE, LSI, HSI, or APB clock. Or it can be clocked from an external clock source over the low power timer's input one input. This latter feature is used for building pulse counter applications and is a key function for metering applications like gas meters, etc. The low power timer features up to eight external trigger sources with configurable polarity. External trigger inputs feature digital filters to cancel out faulty triggers that could be raised in noisy operating environments. The low power timer can be configured to run either in continuous or one-shot mode. One-shot mode is used for generating pulse wave forms while continuous mode is used to generate PWM wave forms. The low power timer is a peripheral with two clock domains. The APB clock domain contains the peripheral's APB interface. The kernel clock domain contains the low power timer peripheral's core functions. The kernel clock domain can be clocked by the APB clock source or by other internal clock sources including the LSE, LSI, and HSI sources. Also the kernel clock domain can be clocked from an external clock source through the timer's input one input. The low power timer peripheral embeds a 16-bit counter that is fed through a power of two pre-scaler. The low power timer peripheral features a 16-bit auto reload register and a 16-bit compare register that are used to set the period and duty cycle respectively for a PWM wave form signal output on the timer's out output. The low power timer features an encoder mode function that can be used to interface with incremental quadrature encoder sensors using the peripheral's input one and input two inputs. Both inputs feature glitch filtering circuitry. The low power timer can be used to output various kinds of waveforms even when the microcontroller is in low power modes where almost all internal clock sources are turned off. The LP-TIM-CMP and LP-TIM-ARR registers in conjunction with the bitfield's wave from the LP-TIM-CFGR register and SNG-STRT from the LP-TIM-CR register are used to control the output waveform. The output waveform is either a typical PWM signal with its period and duty cycle controlled by the LP-TIM-ARR and LP-TIM-CMP registers respectively or it is a single pulse with the last output state defined by the configured waveform. If the last output state is the same as the one at the waveform's beginning then one pulse mode is configured. If not then set once mode is configured. The low power timer's output polarity is controlled through the WAV-POL bitfield in the LP-TIM-CFGR register. The low power timer features an encoder mode function that can interface with the incremental quadrature encoder sensors using the peripheral's input one and input two inputs. Both inputs feature glitch filtering circuitry. The encoder function is similar to the one embedded in the general purpose timers. In order to use the encoder mode function the low power timer must be running in continuous mode. One important thing to note is that only low power timer one embeds the encoder mode function. Low power timer two doesn't embed an encoder mode function. The low power timer peripheral features seven interrupt sources. The compare match interrupt is raised once the content of counter register LP-TIM-CNT matches or is greater than the compare register LP-TIM-CMP content. The auto reload match interrupt is raised when the counter register's content matches the auto reload register's content. The external trigger event interrupt is raised when a valid external trigger is detected. The auto reload register write completed and the compare register write completed interrupts are raised when the transfer of the content of the LP-TIM-ARR register and LP-TIM-CMP register respectively is completed from the peripheral's APB interface logic into the peripheral's core logic which are contained by two different clock domains. These two interrupts are useful in mitigating the overhead of polling on the status of writing to these two registers when the peripheral core clock is too slow compared to the APB interface clock. The up and down direction change interrupts are raised when the encoder mode function is enabled and the counting direction is changed from up to down or vice versa. The counting direction of the low power timer's counter reflects the rotation direction of the quadrature's sensor. The low power timer peripheral is active in run, sleep and stop power modes. The low power timer is able to wake up the microcontroller from either sleep or stop modes.