Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
304
15.2.1
Scaler
Tx mode: The division clock after scaler is carrier frequency. For example, SCLK=100MHz, carrier frequency = 455kHz, IR_DIV_NUM =
(100M/455k) – 1.
Rx mode: The division clock after scaler is sampling clock. Combining Rx counter with sampling clock, software can analyze high or low
level signal duration. For example, Rx sampling clock is 10MHz, Rx count is 0x800000FF, it indicates that high level duration is 255us
(bit[31] indicates input level 1: high, 0: low).
15.2.2
Glitch Filter
There is a glitch filter before IR input sampling, and the glitch filter can be set to 20ns, 30ns, 40ns, 50ns, 60ns, 70ns, 80ns or 90ns.
15.2.3
Interrupt
Each mode has some interrupt flags (See Table 15-1), and these interrupt sources can be enabled, masked, or cleared individually.
Table 15-1 Interrupts
Mode
Interrupt Flag
Description
Tx mode
IR_TX_FIFO_OVER_INT
When Tx FIFO is full, writing data to Tx FIFO triggers this interrupt.
IR_TX_FIFO_LEVEL_INT
When Tx FIFO offset decreases from threshold value to threshold value - 1, this interrupt is
triggered.
IR_TX_FIFO_EMPTY_INT
When Tx FIFO offset decreases from 1 to 0, this interrupt is triggered.
Rx mode
IR_RX_FIFO_ERROR_INT
When Rx FIFO is empty, reading data from Rx FIFO triggers this interrupt.
IR_RX_CNT_THR_INT
When given input level duration exceeds Rx counter threshold, this interrupt is triggered.
IR_RX_FIFO_OF_INT
When Tx FIFO is full, Rx more data from IR input pin triggers this interrupt.
IR_RX_FIFO_LEVEL_INT
When Rx FIFO offset increases from threshold value to threshold value + 1, this interrupt is
triggered.
IR_RX_FIFO_FULL_INT
When Rx FIFO is full, this interrupt is triggered.
15.3
Registers
Table 15-2 lists the details of IR registers. The physical base address of IR is 0x4001_2000, and the size is 4KB.
Table 15-2 IR registers
Name
Offset
Access
Description
IR clock control register
0x0000
R/W
IR clock division register
IR Tx registers
0x0004
R/W
IR Tx configuration register
0x0008
RO
IR Tx FIFO and interrupt status register
0x000C
R/W
IR Tx compensation division register
0x0010
WC
IR Tx FIFO and interrupt clear register
0x0014
W
IR Tx FIFO register
IR Rx registers
0x0018
R/W
IR Rx configuration register
0x001C
RO
IR Rx FIFO and interrupt status register
0x0020
WC
IR Rx FIFO and interrupt clear register
IR_RX_CNT_INT_SEL 0x0024
R/W
IR Rx count threshold configure register
0x0028
RO
IR Rx FIFO register
IR version register
0x002C
RO
IR IP version register
Realtek confidential files
SZ99iot
2019-05-15 10:08:03