31. Infrared interface (IRTIM)

An infrared interface (IRTIM) for remote control is available on the device. It can be used with an infrared LED to perform remote control functions.

It uses internal connections with TIM16, and TIM17 as shown in Figure 264 .

To generate the infrared remote control signals, the IR interface must be enabled and TIM16 channel 1 (TIM16_OC1) and TIM17 channel 1 (TIM17_OC1) must be properly configured to generate correct waveforms.

The infrared receiver can be implemented easily through a basic input capture mode.

Figure 264. IRTIM internal hardware connections with TIM16 and TIM17

Figure 264: IRTIM internal hardware connections with TIM16 and TIM17. The diagram shows two timer output channels, TIM17_CH1 and TIM16_CH1, connected to an IRTIM block. TIM17_CH1 is connected to the top input of the IRTIM block, and TIM16_CH1 is connected to the bottom input. The IRTIM block is an AND gate with an inversion bubble at its output. The output of the IRTIM block is connected to the IR_OUT pin. Waveforms are shown for each signal: TIM17_CH1 is a high-frequency carrier signal, TIM16_CH1 is a low-frequency modulation envelope, and IR_OUT is the modulated carrier signal. The diagram is labeled MS30474V2 in the bottom right corner.

The diagram illustrates the internal hardware connections for the Infrared interface (IRTIM). It features two timer output channels, TIM17_CH1 and TIM16_CH1, which are connected to the inputs of an IRTIM block. TIM17_CH1 provides a high-frequency carrier signal, while TIM16_CH1 provides a low-frequency modulation envelope. The IRTIM block, represented by an AND gate symbol with an inversion bubble at its output, combines these signals. The output of the IRTIM block is connected to the IR_OUT pin, which produces a modulated carrier signal. Waveforms are shown for each signal: TIM17_CH1 is a high-frequency carrier signal, TIM16_CH1 is a low-frequency modulation envelope, and IR_OUT is the modulated carrier signal. The diagram is labeled MS30474V2 in the bottom right corner.

Figure 264: IRTIM internal hardware connections with TIM16 and TIM17. The diagram shows two timer output channels, TIM17_CH1 and TIM16_CH1, connected to an IRTIM block. TIM17_CH1 is connected to the top input of the IRTIM block, and TIM16_CH1 is connected to the bottom input. The IRTIM block is an AND gate with an inversion bubble at its output. The output of the IRTIM block is connected to the IR_OUT pin. Waveforms are shown for each signal: TIM17_CH1 is a high-frequency carrier signal, TIM16_CH1 is a low-frequency modulation envelope, and IR_OUT is the modulated carrier signal. The diagram is labeled MS30474V2 in the bottom right corner.

All standard IR pulse modulation modes can be obtained by programming the two timer output compare channels.

TIM17 is used to generate the high frequency carrier signal, while TIM16 generates the modulation envelope.

The infrared function is output on the IR_OUT pin. The activation of this function is done through the GPIOx_AFRx register by enabling the related alternate function bit.