 Hello and welcome to this presentation of the STM32 infrared interface, or IR-TIM. It covers the main features of this peripheral, which is used to generate an infrared remote control signal. The infrared timer peripheral facilitates the generation of infrared remote control protocols used in many consumer devices, such as TV sets, audio systems, air conditioning units, etc. The infrared timer provides a simple modulator to generate the remote control signal using timers 16 and 17 to generate the carrier frequency and modulation signal. The user can configure a wide range of carrier frequencies and modulations to facilitate the implementation of any remote control protocol. The infrared timer provides hardware support to generate remote control signals. The carrier frequency is generated autonomously by the timer while the modulation waveform is controlled by software. This allows flexibility to support any required infrared remote control protocol. The infrared timer automatically combines the carrier frequency and the modulation waveform into a signal controlling the infrared LED that transmits IR control signals to the control device. The application doesn't require external transistors as the infrared LED can be driven directly by the GPIO pin. Many remote control protocols including RC5, RC6, SIRC and others can be implemented and supported due to flexible and simple modulation control. The CPU workload is limited to the control of the modulation signal only. This slide highlights the differences between the STM32F0, the STM32G0 and STM32G4 IR TIM modules. The STM32L4 and STM32G4 support the same IR TIM module. An infrared interface for remote control is available on the device. It can be used with an infrared LED to perform remote control functions. The activation of this function is done through the GPIO alternate function register by enabling the related alternate function bit. TIM17 is used to generate the high frequency carrier signal while TIM16 generates the modulation envelope. The IR output signal can be driven on GPIO's PA13 or PB9. Timer17 generates the carrier frequency for the remote control protocol used in the application. The carrier frequency can be configured to any frequency needed by the chosen protocol including typical frequencies in the range of 34 to 40 kHz. This is done by configuring TIM17 into PWM mode with a 50% duty cycle. Once the timer is started it doesn't require additional software control including interrupts. For a detailed description on how to configure TIM17 please refer to the timer section in the reference manual. TIM16 generates the modulation waveform for the remote control protocol used in the application. The timer is configured in output compare mode using the output compare interrupt to generate pulses representing a logical 0 or 1 and control the modulation of the data flow. For a detailed description of how to configure TIM16 please refer to the timer section in the reference manual. The infrared timer modulator is a simple gate gating the carrier frequency from TIM17 by a modulation waveform from TIM16. To avoid spikes and glitches on the output waveform the infrared timer gate is synchronized with the carrier frequency from TIM17. All standard IR pulse modulation modes can be obtained by programming TIM16 and TIM17 output compare channels. The infrared timer output is an alternate GPIO feature configurable in the GPIO AFR registers. The IR output pin can directly drive the infrared LED especially on pin PB9 where the high sync driver capability is supported. This feature can be activated through the system configuration register. GPIO PA13 doesn't support this option. No interrupt is associated directly with the infrared timer however the TIM16 interrupt is used to control the modulation of the output signal. The infrared timer can be active only in run and sleep modes. In all of the low power modes including stop, standby and shutdown modes the infrared timer must be disabled. The listed peripherals influence infrared timer behavior. Please refer to the additional peripheral trainings for complete information.