SPRUJ17I March 2022 – August 2025 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
Depending on the encoding method (variable pulse distance/biphase), the Host CPU must develop a data structure that combines 1 and 0 with a t period to encode the complete frame to transmit. This can then be transmitted to the infrared output with a modulation method, as shown in Figure 13-82.
Figure 13-82 CIR Mode Block ComponentsBased on the requested modulation frequency, the UART_CFPS register must be set with the correct dividing value to provide an accurate pulse frequency:
Dividing value = (FCLK / 12) / MODfreq
Where:
FCLK = System clock frequency (48 MHz)
12 = Real value of baud multiple
MODfreq = Effective frequency of the modulation (MHz)
Example: For a targeted modulation frequency of 36 kHz, the value of CFPS must be set to 0x7 (decimal), which provides a modulation frequency of 36.04 kHz.
The UART_CFPS register starts with a reset value of 105 (decimal), which translates to a frequency of 38.1 kHz.
The duty cycle of these pulses is user-defined by the pulse duty register bits in the UART_MDR2 register. Table 13-98 shows the duty cycle.
| UART_MDR2[5-4] CIR_PULSE_MODE | Duty Cycle (High-Level) |
|---|---|
| 00 | 1/4 |
| 01 | 1/3 |
| 10 | 5/12 |
| 11 | 1/2 |