![Intel IXP45X Скачать руководство пользователя страница 777](http://html1.mh-extra.com/html/intel/ixp45x/ixp45x_developers-manual_2073092777.webp)
Intel
®
IXP45X and Intel
®
IXP46X Product Line of Network Processors
August 2006
Developer’s Manual
Reference Number: 306262-004US
777
GPIO Controller—Intel
®
IXP45X and Intel
®
IXP46X Product Line of Network Processors
l
15.4
Theory of Operation
The GPIO pin is controlled through six registers and two more registers provide status.
Each register can be read through the APB interface and all registers except GPINR can
be written through the APB interface.
The GPIO on the IXP45X/IXP46X network processors can be configured to be used as
general-purpose inputs or general-purpose outputs. Three 16-bit registers are used in
order to configure, initialize, and use the general-purpose I/O. These registers are:
• General-Purpose Data Output Register (GPOUTR)
• General-Purpose Output Enable Register (GPOER)
• General-Purpose Input Status Register (GPINR)
The General-Purpose Output Enable Register is used to configure the GPIO pins as an
input or an output. There is a one-for-one relationship between the register bit
mapping and the GPIO. For example, bit 0 of the general-purpose Output Enable
Register corresponds to GPIO 0 and bit 1 of the General-Purpose Output Enable
Register corresponds to GPIO 1.
When a bit of the General-Purpose Enable Register contains logic 0, the corresponding
GPIO will be configured as an output. A logic 1 in the same bit of the General-Purpose
Enable Register will cause the corresponding GPIO to be configured as an input.
For example, the General-Purpose Output Enable Register contains a hexadecimal
value of 0x00000500. GPIO 8 and GPIO 10 will be configured as inputs and all other
GPIO will be configured as outputs. The GPIO that are configured as outputs — by the
values contained in the General-Purpose Enable Register — will be driven by the values
contained in the General-Purpose Data Output Register.
The General-Purpose Data Output Register is a 16-bit register with a one-for-one
correspondence between the 16 bits of the General-Purpose Data Output Register and
the 16-bit GPIO. When logic 1 is written to a bit in the General-Purpose Data Output
Register — and the corresponding bit in the General-Purpose Enable Register is set to
logic 0 — logic 1 will be replicated to the corresponding GPIO. When logic 0 is written to
Figure 185. GPIO Block Diagram
B4231-01
GPOER
GPDBSELR
GPOUTR
GPCLKR
GPINR
GPISR
GPIT1R
GPIT2R
APB
Interface
GPIO_INTR
CLK GEN
GPIO
Pin
Wave Shape
GPIO_INT_NPE