寄存器

请查看 寄存器访问类型 ,了解 Access 列缩写的含义。

RTL8721Dx:

Base Address: 0x41107000

Name

Address offset

Access

Description

REG_IR_CLK_DIV

000h

R/W

REG_IR_TX_CONFIG

004h

R/W

REG_IR_TX_SR

008h

R

REG_IR_TX_COMPE_DIV

00Ch

R/W

REG_IR_TX_INT_CLR

010h

R/W

REG_IR_TX_FIFO

014h

R/W

REG_IR_RX_CONFIG

018h

R/W

REG_IR_RX_SR

01Ch

R

REG_IR_RX_INT_CLR

020h

R/W

REG_IR_RX_CNT_INT_SEL

024h

R/W

REG_IR_RX_FIFO

028h

R

REG_IR_VERSION

02Ch

R

REG_IR_DUMMY

030h

R

REG_IR_CLK_DIV

  • Name: IR clock division register

  • Size: 32

  • Address offset: 000h

  • Read/write access: R/W

31:12 RSVD 11:0 IR_CLK_DIV

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

IR_CLK_DIV

R/W

0x0

IR_CLK = IO_CLK/(1 + IR_CLK_DIV)

  • Tx mode: divider number to generate IrDA modulation frequency.

For example: sys_clk = 100MHz, modulation_freq = 455kHz, IR_DIV_NUM = (sys_clk/modulation_freq) - 1

  • Rx mode: waveform sample clock.

IR_DIV_NUM = (sys_clk/sample clock) - 1

For example: sample clock = 100MHz, IR_DIV_NUM = 0; sample clock = 50MHz, IR_DIV_NUM = 1

REG_IR_TX_CONFIG

  • Name: IR Tx configuration register

  • Size: 32

  • Address offset: 004h

  • Read/write access: R/W

31 IR_MODE_SEL 30 IR_TX_START 29:28 RSVD 27:16 IR_TX_DUTY_NUM 15 RSVD 14 IR_TX_OUTPUT_INVERSE 13 IR_TX_DE_INVERSE 12:8 IR_TX_FIFO_LEVEL_TH 7 RSVD 6 IR_TX_IDLE_STATE 5 IR_TX_FIFO_OVER_INT_MASK 4 IR_TX_FIFO_OVER_INT_EN 3 IR_TX_FIFO_LEVEL_INT_MASK 2 IR_TX_FIFO_EMPTY_INT_MASK 1 IR_TX_FIFO_LEVEL_INT_EN 0 IR_TX_FIFO_EMPTY_INT_EN

Bit

Symbol

Access

INI

Description

31

IR_MODE_SEL

R/W

0x0

  • 0: Tx mode

  • 1: Rx mode

30

IR_TX_START

R/W

0x0

  • 0: FSM stops at idle state.

  • 1: FSM runs.

29:28

RSVD

R

-

Reserved

27:16

IR_TX_DUTY_NUM

R/W

0x0

Duty cycle setting for modulation frequency

For example: for 1/3 duty cycle, IR_DUTY_NUM = (IR_DIV_NUM+1)/3

备注

Set this value equal to IR_DIV_NUM to generate 100% duty waveform.

15

RSVD

R

-

Reserved

14

IR_TX_OUTPUT_INVERSE

R/W

0x0

  • 0: Not inverse active output

  • 1: Inverse active output

13

IR_TX_DE_INVERSE

R/W

0x0

  • 0: Not inverse FIFO define

  • 1: Inverse FIFO define

12:8

IR_TX_FIFO_LEVEL_TH

R/W

0x0

Tx FIFO interrupt threshold.

When Tx FIFO depth = < threshold value, interrupt is triggered.

7

RSVD

R

-

Reserved

6

IR_TX_IDLE_STATE

R/W

0x0

Tx output state in idle

  • 0: Low

  • 1: High

5

IR_TX_FIFO_OVER_INT_MASK

R/W

0x0

Tx FIFO overflow interrupt

  • 0: Unmask

  • 1: Mask

4

IR_TX_FIFO_OVER_INT_EN

R/W

0x0

Tx FIFO overflow interrupt

  • 0: Disable

  • 1: Enable

3

IR_TX_FIFO_LEVEL_INT_MASK

R/W

0x0

Tx FIFO level interrupt

  • 0: Unmask

  • 1: Mask

2

IR_TX_FIFO_EMPTY_INT_MASK

R/W

0x0

Tx FIFO empty interrupt

  • 0: Unmask

  • 1: Mask

1

IR_TX_FIFO_LEVEL_INT_EN

R/W

0x0

Tx FIFO level interrupt

When Tx FIFO offset <= threshold value, interrupt is triggered.

  • 0: Disable

  • 1: Enable

0

IR_TX_FIFO_EMPTY_INT_EN

R/W

0x0

Tx FIFO empty interrupt

  • 0: Disable

  • 1: Enable

REG_IR_TX_SR

  • Name: IR Tx FIFO and interrupt status register

  • Size: 32

  • Address offset: 008h

  • Read/write access: R

31:16 RSVD 15 IR_TX_FIFO_EMPTY 14 IR_TX_FIFO_FULL 13:8 IR_TX_FIFO_OFFSET 7:5 RSVD 4 IR_TX_STATUS 3 RSVD 2 IR_TX_FIFO_OVER_INT_STATUS 1 IR_TX_FIFO_LEVEL_INT_STATUS 0 IR_TX_FIFO_EMPTY_INT_STATUS

Bit

Symbol

Access

INI

Description

31:16

RSVD

R

-

Reserved

15

IR_TX_FIFO_EMPTY

R

0x0

  • 0: Not empty

  • 1: Empty

14

IR_TX_FIFO_FULL

R

0x0

  • 0: Not full

  • 1: Full

13:8

IR_TX_FIFO_OFFSET

R

0x0

Tx FIFO offset is from 0 to 32.

备注

After Tx last packet, hardware can't clear Tx FIFO offset.

7:5

RSVD

R

-

Reserved

4

IR_TX_STATUS

R

0x0

  • 0: Idle

  • 1: Run

3

RSVD

R

-

Reserved

2

IR_TX_FIFO_OVER_INT_STATUS

R

0x0

Tx FIFO overflow interrupt

  • 0: Interrupt inactive

  • 1: Interrupt active

1

IR_TX_FIFO_LEVEL_INT_STATUS

R

0x0

When Tx FIFO offset <= threshold value, interrupt is triggered.

  • 0: Interrupt inactive

  • 1: Interrupt active

0

IR_TX_FIFO_EMPTY_INT_STATUS

R

0x0

Tx FIFO empty interrupt

  • 0: Interrupt inactive

  • 1: Interrupt active

REG_IR_TX_COMPE_DIV

  • Name: IR Tx compensation division register

  • Size: 32

  • Address offset: 00Ch

  • Read/write access: R/W

31:12 RSVD 11:0 TX_COMPE_DIV

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TX_COMPE_DIV

R/W

0x0

IR_TX_CLK_Period = SCLK/(TX_COMPE_DIV + 1)

REG_IR_TX_INT_CLR

  • Name: IR Tx FIFO and interrupt clear register

  • Size: 32

  • Address offset: 010h

  • Read/write access: R/W

31:4 RSVD 3 IR_TX_FIFO_OVER_INT_CLR 2 IR_TX_FIFO_LEVEL_INT_CLR 1 IR_TX_FIFO_EMPTY_INT_CLR 0 IR_TX_FIFO_CLR

Bit

Symbol

Access

INI

Description

31:4

RSVD

R

-

Reserved

3

IR_TX_FIFO_OVER_INT_CLR

R/W

Tx FIFO overflow interrupt

Write 1 to clear

2

IR_TX_FIFO_LEVEL_INT_CLR

R/W

When Tx FIFO offset <= threshold value, interrupt is triggered.

Write 1 to clear

1

IR_TX_FIFO_EMPTY_INT_CLR

R/W

Tx FIFO empty interrupt

Write 1 to clear

0

IR_TX_FIFO_CLR

R/W

Write 1 to clear Tx FIFO

REG_IR_TX_FIFO

  • Name: IR Tx FIFO register

  • Size: 32

  • Address offset: 014h

  • Read/write access: R/W

31 IR_TX_DATA_TYPE 30 IR_TX_DATA_END_FLAG 29:28 IR_TX_COMPENSATION 27:0 IR_TX_DATA_TIME

Bit

Symbol

Access

INI

Description

31

IR_TX_DATA_TYPE

R/W

0

Data type

  • 0: Inactive carrier (no carrier)

  • 1: Active carrier (carrier)

30

IR_TX_DATA_END_FLAG

R/W

0

  • 0: Normal packet

  • 1: Last packet

29:28

IR_TX_COMPENSATION

R/W

0

  • 0x0: IR_TX_CLK_Period = Tsys_clk * IR_CLK_DIV

  • 0x1: IR_TX_CLK_Period = (1 + 1/2) Tsys_clk * IR_CLK_DIV

  • 0x2: IR_TX_CLK_Period = (1 + 1/4) Tsys_clk * IR_CLK_DIV

  • 0x3: IR_TX_CLK_Period = Tsys_clk * (IR_TX_COMPE_DIV + 1)

27:0

IR_TX_DATA_TIME

R/W

0

Real active time = (IR_TX_DATA_TIME + 1) * IR_TX_CLK_Period

REG_IR_RX_CONFIG

  • Name: IR Rx configuration register

  • Size: 32

  • Address offset: 018h

  • Read/write access: R/W

31:29 RSVD 28 IR_RX_START 27 IR_RX_START_MODE 26 IR_RX_MAN_START 25:24 IR_RX_TRIGGER_MODE 23:21 IR_RX_FILTER_STAGETX 20 RSVD 19 IR_RX_FIFO_ERROR_INT_MASK 18 IR_RX_CNT_THR_INT_MASK 17 IR_RX_FIFO_OF_INT_MASK 16 IR_RX_CNT_OF_INT_MASK 15 IR_RX_FIFO_LEVEL_INT_MASK 14 IR_RX_FIFO_FULL_INT_MASK 13 IR_RX_FIFO_DISCARD_SET 12:8 IR_RX_FIFO_LEVEL_TH 7:6 RSVD 5 IR_RX_FIFO_ERROR_INT_EN 4 IR_RX_CNT_THR_INT_EN 3 IR_RX_FIFO_OF_INT_EN 2 IR_RX_CNT_OF_INT_EN 1 IR_RX_FIFO_LEVEL_INT_EN 0 IR_RX_FIFO_FULL_INT_EN

Bit

Symbol

Access

INI

Description

31:29

RSVD

R

-

Reserved

28

IR_RX_START

R/W

0x0

  • 0: FSM stops at idle state.

  • 1: FSM runs.

27

IR_RX_START_MODE

R/W

0x0

  • 0: Manual mode, IR_RX_MAN_START control

  • 1: Auto-mode, Trigger-mode control

26

IR_RX_MAN_START

R/W

0x0

If IR_RX_TRIGGER_MODE =0, writing 1 means starting to check the waveform.

25:24

IR_RX_TRIGGER_MODE

R/W

0x0

  • 00: High --> low trigger

  • 01: Low -> high trigger

  • 10: High -> low or low ->high trigger

23:21

IR_RX_FILTER_STAGETX

R/W

0x0

  • 0x0: Filter <= 20ns glitch

  • 0x1: Filter <= 30ns glitch

  • 0x2: Filter <= 40ns glitch

  • 0x3: Filter <= 50ns glitch

…

20

RSVD

R

-

Reserved

19

IR_RX_FIFO_ERROR_INT_MASK

R/W

0x0

Rx FIFO error read interrupt

When Rx FIFO is empty, read Rx FIFO and trigger interrupt.

  • 0: Unmask

  • 1: Mask

18

IR_RX_CNT_THR_INT_MASK

R/W

0x0

Rx count threshold interrupt

  • 0: Unmask

  • 1: Mask

17

IR_RX_FIFO_OF_INT_MASK

R/W

0x0

Rx FIFO overflow

  • 0: Unmask

  • 1: Mask

16

IR_RX_CNT_OF_INT_MASK

R/W

0x0

RX counter overflow

  • 0: Unmask

  • 1: Mask

15

IR_RX_FIFO_LEVEL_INT_MASK

R/W

0x0

Rx FIFO level interrupt

  • 0: Unmask

  • 1: Mask

When Rx FIFO offset >= threshold value, this interrupt is triggered.

14

IR_RX_FIFO_FULL_INT_MASK

R/W

0x0

Rx FIFO full interrupt

  • 0: Unmask

  • 1: Mask

13

IR_RX_FIFO_DISCARD_SET

R/W

0x0

When FIFO is full, new data is send to FIFO.

  • 0: Discard oldest data in FIFO.

  • 1: Reject new data sending to FIFO.

12:8

IR_RX_FIFO_LEVEL_TH

R/W

0x0

Rx FIFO interrupt threshold

When Rx FIFO depth > threshold value, this interrupt is triggered.

7:6

RSVD

R

-

Reserved

5

IR_RX_FIFO_ERROR_INT_EN

R/W

0x0

Rx FIFO error read interrupt

When Rx FIFO is empty, reading the Rx FIFO triggers this interrupt.

  • 0: Disable

  • 1: Enable

4

IR_RX_CNT_THR_INT_EN

R/W

0x0

Rx count threshold interrupt

  • 0: Disable

  • 1: Enable

3

IR_RX_FIFO_OF_INT_EN

R/W

0x0

RX FIFO overflow

  • 0: Disable

  • 1: Enable

2

IR_RX_CNT_OF_INT_EN

R/W

0x0

RX counter overflow

  • 0: Disable

  • 1: Enable

1

IR_RX_FIFO_LEVEL_INT_EN

R/W

0x0

Rx FIFO level interrupt

When Rx FIFO offset >= threshold value, this interrupt is triggered.

  • 0: Disable

  • 1: Enable

0

IR_RX_FIFO_FULL_INT_EN

R/W

0x0

Rx FIFO full interrupt

  • 0: Disable

  • 1: Enable

REG_IR_RX_SR

  • Name: IR Rx FIFO and interrupt status register

  • Size: 32

  • Address offset: 01Ch

  • Read/write access: R

31:18 RSVD 17 IR_RX_FIFO_EMPTY 16 IR_RX_FIFO_FULL 15:14 RSVD 13:8 IR_RX_FIFO_OFFSET 7 IR_RX_STATE 6 RSVD 5 IR_RX_FIFO_ERROR_INT_STATUS 4 IR_RX_CNT_THR_INT_STATUS 3 IR_RX_FIFO_OF_INT_STATUS 2 IR_RX_CNT_OF_INT_STATUS 1 IR_RX_FIFO_LEVEL_INT_STATUS 0 IR_RX_FIFO_FULL_INT_STATUS

Bit

Symbol

Access

INI

Description

31:18

RSVD

R

-

Reserved

17

IR_RX_FIFO_EMPTY

R

0x0

  • 0: Not empty

  • 1: Empty

16

IR_RX_FIFO_FULL

R

0x0

  • 0: Not full

  • 1: Full

15:14

RSVD

R

-

Reserved

13:8

IR_RX_FIFO_OFFSET

R

0x0

Rx FIFO offset

7

IR_RX_STATE

R

0x0

  • 0: Idle

  • 1: Run

6

RSVD

R

-

Reserved

5

IR_RX_FIFO_ERROR_INT_STATUS

R

0x0

Rx FIFO error read interrupt status

When Rx FIFO is empty, reading the Rx FIFO triggers this interrupt.

  • 0: Interrupt is inactive

  • 1: Interrupt is active

4

IR_RX_CNT_THR_INT_STATUS

R

0x0

Rx count threshold interrupt status

  • 0: Interrupt is inactive

  • 1: Interrupt is active

3

IR_RX_FIFO_OF_INT_STATUS

R

0x0

Rx FIFO overflow interrupt status

  • 0: Interrupt is inactive

  • 1: Interrupt is active

2

IR_RX_CNT_OF_INT_STATUS

R

0x0

Rx counter overflow interrupt status

  • 0: Interrupt is inactive

  • 1: Interrupt is active

1

IR_RX_FIFO_LEVEL_INT_STATUS

R

0x0

Rx FIFO level interrupt status

  • 0: Interrupt is inactive

  • 1: Interrupt is active

0

IR_RX_FIFO_FULL_INT_STATUS

R

0x0

Rx FIFO full interrupt status

  • 0: Interrupt is inactive

  • 1: Interrupt is active

REG_IR_RX_INT_CLR

  • Name: IR Rx FIFO and interrupt clear register

  • Size: 32

  • Address offset: 020h

  • Read/write access: R/W

31:9 RSVD 8 IR_RX_FIFO_CLR 7:6 RSVD 5 IR_RX_FIFO_ERROR_INT_CLR 4 IR_RX_CNT_THR_INT_CLR 3 IR_RX_FIFO_OF_INT_CLR 2 IR_RX_CNT_OF_INT_CLR 1 IR_RX_FIFO_LEVEL_INT_CLR 0 IR_RX_FIFO_FULL_INT_CLR

Bit

Symbol

Access

INI

Description

31:9

RSVD

R

-

Reserved

8

IR_RX_FIFO_CLR

R/W

Write 1 to clear Rx FIFO

7:6

RSVD

R

-

Reserved

5

IR_RX_FIFO_ERROR_INT_CLR

R/W

Rx FIFO error read interrupt

Write 1 to clear

4

IR_RX_CNT_THR_INT_CLR

R/W

Rx count threshold interrupt

Write 1 to clear

3

IR_RX_FIFO_OF_INT_CLR

R/W

Rx FIFO overflow interrupt

Write 1 to clear

2

IR_RX_CNT_OF_INT_CLR

R/W

Rx counter overflow interrupt

Write 1 to clear

1

IR_RX_FIFO_LEVEL_INT_CLR

R/W

Rx FIFO level interrupt

Write 1 to clear

0

IR_RX_FIFO_FULL_INT_CLR

R/W

Rx FIFO full interrupt

Write 1 to clear

REG_IR_RX_CNT_INT_SEL

  • Name: IR Rx count threshold configure register

  • Size: 32

  • Address offset: 024h

  • Read/write access: R/W

31 IR_RX_CNT_THR_TRIGGER_LV 30:0 IR_RX_CNT_THR

Bit

Symbol

Access

INI

Description

31

IR_RX_CNT_THR_TRIGGER_LV

R/W

0x0

Trigger level

  • 0: When low level counter >= threshold, trigger interrupt

  • 1: When high level counter >= threshold, trigger interrupt

30:0

IR_RX_CNT_THR

R/W

0x0

31-bits threshold

REG_IR_RX_FIFO

  • Name: IR Rx FIFO register

  • Size: 32

  • Address offset: 028h

  • Read/write access: R

31 IR_RX_LEVEL 30:0 IR_RX_CNT

Bit

Symbol

Access

INI

Description

31

IR_RX_LEVEL

R

0x0

Rx Level

  • 1: High level

  • 0: Low level

30:0

IR_RX_CNT

R

0x0

31 bits cycle duration

REG_IR_VERSION

  • Name: IR version register

  • Size: 32

  • Address offset: 02Ch

  • Read/write access: R

31:0 IR_VERSION

Bit

Symbol

Access

INI

Description

31:0

IR_VERSION

R

0x1410150A

IR IP version

REG_IR_DUMMY

  • Name: IR Dummy Register

  • Size: 32

  • Address offset: 030h

  • Read/write access: R

31:16 RSVD 15:0 DUMMY

Bit

Symbol

Access

INI

Description

31:16

RSVD

R

-

Reserved

15:0

DUMMY

R

0x0

Reserved for HW