寄存器

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

RTL8721Dx:

Base Address: 0x41010000

Name

Address offset

Access

Description

REG_GPIO_DR

000h

R/W

REG_GPIO_DDR

004h

R/W

REG_GPIO_CTL

008h

R

REG_GPIO_INT_EN

030h

R/W

REG_GPIO_INT_TYPE

038h

R/W

REG_GPIO_INT_POLARITY

03Ch

R/W

REG_GPIO_INT_STATUS

040h

R

REG_GPIO_INT_STATUS_RAW

044h

R

REG_GPIO_DEBOUNCE

048h

R/W

REG_GPIO_INT_EOI

04Ch

R/W

REG_GPIO_EXT_PORT

050h

R

REG_GPIO_ITN_LS_SYNC

060h

R/W

REG_GPIO_ID_CODE

064h

R

REG_GPIO_INT_BOTHEDGE

068h

R/W

REG_GPIO_VER_ID_CODE

06Ch

R

REG_GPIO_DB_DIV_CONFIG

078h

R

REG_GPIO_DR

  • Name: PortA/B data register

  • Size: 32

  • Address offset: 000h

  • Read/write access: R/W

31:0 PORT_DATA

Bit

Symbol

Access

INI

Description

31:0

PORT_DATA

R/W

0

Values written to this register are output on the I/O signals for Portx if the corresponding data direction bits for Portx are set to output mode and the corresponding control bit for Portx is set to software mode. The value read back equals to the last value written to this register.

REG_GPIO_DDR

  • Name: PortA/B data direction register

  • Size: 32

  • Address offset: 004h

  • Read/write access: R/W

31:0 PORT_DATA_DIRECTION

Bit

Symbol

Access

INI

Description

31:0

PORT_DATA_DIRECTION

R/W

0

Values written to this register independently control the direction of the corresponding data bit in Portx. The default direction can be configured as input or output after system reset through the GPIO_DFLT_DIR_x parameter.

  • 0: Input (default)

  • 1: Output

REG_GPIO_CTL

  • Name: PortA/B data source register

  • Size: 32

  • Address offset: 008h

  • Read/write access: R

31:0 RSVD

Bit

Symbol

Access

INI

Description

31:0

RSVD

R

-

Reserved

REG_GPIO_INT_EN

  • Name: PortA/B interrupt enable register

  • Size: 32

  • Address offset: 030h

  • Read/write access: R/W

31:0 GPIO_INT_EN

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_EN

R/W

0

Allows each bit of Portx to be configured for interrupts. By default, the generation of interrupts is disabled. Whenever a 1 is written to a bit of this register, it configures the corresponding bit on Portx to become an interrupt; otherwise, Portx operates as a normal GPIO signal. Interrupts are disabled on the corresponding bits of Portx if the corresponding data direction register is set to output or if Portx mode is set to hardware.

  • 0: Configure Portx bit as normal GPIO signal (default)

  • 1: Configure Portx bit as interrupt

REG_GPIO_INT_TYPE

  • Name: PortA/B interrupt trigger type register

  • Size: 32

  • Address offset: 038h

  • Read/write access: R/W

31:0 GPIO_INT_TYPE

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_TYPE

R/W

0

Controls the type of interrupt that can occur on Portx.

Whenever a 0 is written to a bit of this register, it configures the interrupt type to be level-sensitive; otherwise, it is edge-sensitive.

  • 0: Level-sensitive (default)

  • 1: Edge-sensitive

REG_GPIO_INT_POLARITY

  • Name: PortA/B interrupt polarity register

  • Size: 32

  • Address offset: 03Ch

  • Read/write access: R/W

31:0 GPIO_INT_POLARITY

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_POLARITY

R/W

0

Controls the polarity of edge or level sensitivity that can occur on input of Portx. Whenever a 0 is written to a bit of this register, it configures the interrupt type to falling-edge or active-low sensitive; otherwise, it is rising-edge or active-high sensitive.

  • 0: Active-low (default)

  • 1: Active-high

REG_GPIO_INT_STATUS

  • Name: PortA/B interrupt status register

  • Size: 32

  • Address offset: 040h

  • Read/write access: R

31:0 GPIO_INT_STATUS

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_STATUS

R

0

Interrupt status of Portx.

REG_GPIO_INT_STATUS_RAW

  • Name: PortA/B raw interrupt status register

  • Size: 32

  • Address offset: 044h

  • Read/write access: R

31:0 GPIO_RAW_INT_STATUS

Bit

Symbol

Access

INI

Description

31:0

GPIO_RAW_INT_STATUS

R

0

Raw interrupt status of Portx (premasking bits).

REG_GPIO_DEBOUNCE

  • Name: PortA/B interrupt debounce register

  • Size: 32

  • Address offset: 048h

  • Read/write access: R/W

31:0 GPIO_DEBOUNCE_EN

Bit

Symbol

Access

INI

Description

31:0

GPIO_DEBOUNCE_EN

R/W

0

Controls whether an external signal that is the source of an interrupt needs to be debounced to remove any spurious glitches. Writing a 1 to a bit in this register enables the debouncing circuitry. A signal must be valid for two periods of an external clock before it is internally processed.

  • 0: No debounce (default)

  • 1: Enable debounce

This register is available only if Portx is configured to generate interrupts (GPIO_PORTA_INTR = Include(1)) and when the debounce logic is included (GPIO_DEBOUNCE = Include(1)).

REG_GPIO_INT_EOI

  • Name: PortA/B edge type interrupt clear register

  • Size: 32

  • Address offset: 04Ch

  • Read/write access: R/W

31:0 GPIO_INT_EOI

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_EOI

R/W

0

Controls the clearing of edge type interrupts from Portx.

When a 1 is written into a corresponding bit of this register, the interrupt is cleared. All interrupts are cleared when Portx is not configured for interrupts.

  • 0: No interrupt clear (default)

  • 1: Clear interrupt

REG_GPIO_EXT_PORT

  • Name: External PortA/B data register

  • Size: 32

  • Address offset: 050h

  • Read/write access: R

31:0 GPIO_EXT_PORTA

Bit

Symbol

Access

INI

Description

31:0

GPIO_EXT_PORTA

R

0

When Portx is configured as Input, then reading this location reads the values on the signal. When the data direction of Portx is set as output, reading this location reads the data register for Portx.

REG_GPIO_ITN_LS_SYNC

  • Name: PortA/B level interrupt synchronization

  • Size: 32

  • Address offset: 060h

  • Read/write access: R/W

31:1 RSVD 0 GPIO_LEVEL_SYNC

Bit

Symbol

Access

INI

Description

31:1

RSVD

R

-

Reserved

0

GPIO_LEVEL_SYNC

R/W

0

Writing a 1 to this register results in all level-sensitive interrupts being synchronized to pclk_intr.

  • 0: No synchronization to pclk_intr (default)

  • 1: Synchronize to pclk_intr

REG_GPIO_ID_CODE

  • Name: PortA/B GPIO ID code register

  • Size: 32

  • Address offset: 064h

  • Read/write access: R

31:0 GPIO_ID_CODE

Bit

Symbol

Access

INI

Description

31:0

GPIO_ID_CODE

R

32'h1

This register is available only if Portx is configured to generate interrupts (GPIO_PORTx_INTR = Include(1)) and interrupt detection is configured to generate on both rising and falling edges of external input signal (GPIO_INT_BOTH_EDGE=Include(1)).

REG_GPIO_INT_BOTHEDGE

  • Name: PortA/B both edge interrupt register

  • Size: 32

  • Address offset: 068h

  • Read/write access: R/W

31:0 GPIO_INT_BOTHEDGE

Bit

Symbol

Access

INI

Description

31:0

GPIO_INT_BOTHEDGE

R/W

0

Controls the edge types of interrupt that can occur on Portx.

Whenever a particular bit is programmed to 1, it enables the generation of interrupt on both the rising edge and falling edge of an external input signal corresponding to that bit on Portx.

The values programmed in the registers gpio_intype_level and gpio_int_polarity for this particular bit are not considered when the corresponding bit of this register is set to 1.

Whenever a particular bit is programmed to 0, the interrupt type depends on the value of the corresponding bits in the gpio_inttype_level and gpio_int_polarity registers.

  • 0: Disabled. Single edge sensitive

  • 1: Enabled. Both edge sensitive

REG_GPIO_VER_ID_CODE

  • Name: PortA/B GPIO component version register

  • Size: 32

  • Address offset: 06Ch

  • Read/write access: R

31:0 GPIO_VER_ID_CODE

Bit

Symbol

Access

INI

Description

31:0

GPIO_VER_ID_CODE

R

32'h3231302A

ASCII value for each number in the version, followed by *. For example, 32_30_31_2A represents the version 2.01*.

REG_GPIO_DB_DIV_CONFIG

  • Size: 32

  • Address offset: 078h

  • Read/write access: R

31:0 RSVD

Bit

Symbol

Access

INI

Description

31:0

RSVD

R

-

Reserved