32. 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 TIM15, and TIM16 as shown in Figure 352 .

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

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

Figure 352. IRTIM internal hardware connections with TIM15 and TIM16 and TIM17

Figure 352: IRTIM internal hardware connections with TIM15 and TIM16 and TIM17. The diagram shows two input waveforms, TIM15_CH1 (a high-frequency carrier signal) and TIM16_CH1 (a low-frequency modulation envelope), entering an IRTIM block. The IRTIM block is represented by an AND gate symbol. The output of the IRTIM block is labeled IR_OUT and shows a modulated signal waveform. The diagram is labeled MSv37677V1 in the bottom right corner.

The diagram illustrates the internal hardware connections for the Infrared Interface (IRTIM). On the left, two input waveforms are shown: TIM15_CH1, which is a high-frequency carrier signal, and TIM16_CH1, which is a low-frequency modulation envelope. Both signals are connected to an IRTIM block, which is represented by an AND gate symbol. The output of the IRTIM block is labeled IR_OUT and shows a modulated signal waveform. The diagram is labeled MSv37677V1 in the bottom right corner.

Figure 352: IRTIM internal hardware connections with TIM15 and TIM16 and TIM17. The diagram shows two input waveforms, TIM15_CH1 (a high-frequency carrier signal) and TIM16_CH1 (a low-frequency modulation envelope), entering an IRTIM block. The IRTIM block is represented by an AND gate symbol. The output of the IRTIM block is labeled IR_OUT and shows a modulated signal waveform. The diagram is labeled MSv37677V1 in the bottom right corner.

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

TIM15 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.

The high sink LED driver capability (only available on the PB9 pin) can be activated through the I2C_PB9_FMP bit in the SYSCFG_CFGR1 register and used to sink the high current needed to directly control an infrared LED.