跳到主要内容

14.8 IR-RX

14.8.1 Overview

The IR-RX module is capable of receiving infrared signals and transforming the received signals into digital format. Received data can be accessed through FIFO by checking status or configuring interrupt.

14.8.2 Features

  • Infrared input signals are transformed into the Run-Length-Code (RLC) format
  • Configurable signal width threshold for noise detecting
  • 32 Bytes FIFO for received data storage

14.8.3 Functional Description

The IR-RX module receives infrared signals and transforms the received information into digital format. The input infrared signals are filtered depending on a configurable noise detecting threshold. The transformed data is written into FIFO as the Run-Length-Code (RLC). Software may read the data from FIFO by checking status or configuring interrupt.

The block diagram of IR-RX is depicted below.

The input clock signal (CLK) is divided by a configurable parameter to generate the internal working clock (WCLK) which is used to measure the duration or transition time of the input infrared signal.

When IR_EN=1, the 7-bit width RLC_COUNT counts under the working clock. The RLC_COUNT is cleared to be 0 either if IR_RX changes or if it counts to 127.

When IR_RX changes or RLC_COUNT counts to 127, 1 byte data is written into FIFO.

If RLC_COUNT > NOISETHR at the data sampling moment, the current IR_RX value and the current RLC_COUNT value are stored, which is {IR_RX, RLC_COUNT[6:0]}.

If RLC_COUNT <= NOISETHR at the data sampling moment, the previously stored IR_RX value and the current RLC_COUNT value are stored, which is {IR_RX_old, RLC_COUNT[6:0]}.

For example, the following data in RLC format implies that:

  • 0x98 --> Logic '1' has sustained for 0x18 working clock cycles.
  • 0x7F --> Logic '0' has sustained for 0x7F working clock cycles.
  • 0x06 --> Logic '0' has sustained for 0x06 working clock cycles.
  • 0xFF --> Logic '1' has sustained for 0x7F working clock cycles.

14.8.4 Register Description

The base address of two IR-RX registers in the X100™ field are

  • 0xD401_7E00
  • 0xD401_7F00

The base address of two IR-RX registers in the RT_24 field are

  • 0xC088_7000
  • 0xC088_E000

IRC_EN REGISTER

Offset: 0x0

BitsFieldTypeResetDescription
31:1ReservedRO0x0Reserved
0IRC_ENRW0x0This is the global enable bit for the IR-RX.
0x0: Disabled
0x1: Enabled

CLKDIV REGISTER

Offset: 0x4

BitsFieldTypeResetDescription
31:24ReservedRO0x0Reserved
23:0CLKDIVRW0x0Frequency dividing parameter for generating the internal working clock (WCLK). The generated WCLK frequency is:
Freq_of_WCLK = Freq_of_CLK / (CLKDIV +1)

NOISETHR REGISTER

Offset: 0x8

BitsFieldTypeResetDescription
31:8ReservedRO0x0Reserved
7:0NOISETHRRW0x0Noise detection threshold.

IDLE_STATE REGISTER

Offset: 0xC

BitsFieldTypeResetDescription
31:1ReservedRO0x0Reserved
0IDLE_STATERW0x1This is the IDLE status bit.
0x0: Not IDLE
0x1: IDLE
It is cleared by hardware at the change of input infrared signal. Software could set this bit to 0x1.

FIFO_OUT REGISTER

Offset: 0x10

BitsFieldTypeResetDescription
31:8ReservedRO0x0Reserved
7:0FIFO_OUTRO0x0This is the data output of FIFO.

FIFO_STS REGISTER

Offset: 0x14

BitsFieldTypeResetDescription
31FIFO_fullRO0x0Flag bit of FIFO full.
30FIFO_emptyRO0x1Flag bit of FIFO empty.
29:6ReservedRO0x0Reserved
5:0FIFO_CNTRO0x0This is the number of unread data in FIFO.

FIFO_CMP REGISTER

Offset: 0x18

BitsFieldTypeResetDescription
31:6ReservedRO0x0Reserved
5:0FIFO_CMPRW0x0Comparison value for the number of unread data in FIFO. It is used to generate interruption.

INT_EN REGISTER

Offset: 0x1C

BitsFieldTypeResetDescription
31:4ReservedRO0x0Reserved
3CMP_INT_ENRW0x0Interrupt enable bit for comparison between FIFO_CMP and the number of unread data in FIFO.
2CNT_INT_ENRW0x0Interrupt enable bit for RLC_COUNT counts to 127.
1PEDGE_INT_ENRW0x0Interrupt enable bit for the positive edge of the input infrared signal.
0NEDGE_INT_ENRW0x0Interrupt enable bit for the negative edge of the input infrared signal.

INT_FLAG REGISTER

Offset: 0x20

BitsFieldTypeResetDescription
31:4ReservedRO0x0Reserved
3CMP_INT_FLAGRW1C0x0This bit is set to 1 if the number of unread data in FIFO equals to FIFO_CMP. Interrupt is generated if CMP_INT_EN=1. It can be cleared by writing 0x1 to this bit.
2CNT_INT_FLAGRW1C0x0This bit is set to 1 if RLC_COUNT=127. Interrupt is generated if CNT_INT_EN=1. It can be cleared by writing 0x1 to this bit.
1PEDGE_INT_FLAGRW1C0x0This bit is set to 1 if positive edge of the input infrared signal is detected. Interrupt is generated if PEDGE_INT_EN=1. It can be cleared by writing 0x1 to this bit.
0NEDGE_INT_FLAGRW1C0x0This bit is set to 1 if negative edge of the input infrared signal is detected. Interrupt is generated if NEDGE_INT_EN=1. It can be cleared by writing 0x1 to this bit.