![Marvell PXA300 Скачать руководство пользователя страница 123](http://html.mh-extra.com/html/marvell/pxa300/pxa300_developers-manual_1734615123.webp)
69rlq62d-f714peg4 * Memec (Headquar
ter
s) - Unique
Tec
h,
Insight,
Impact
MAR
VELL CONFIDENTIAL,
UNDER ND
A# 12101050
69rlq62d-f714peg4 * Memec (Headquar
ter
s) - Unique
Tec
h,
Insight,
Impact
MAR
VELL CONFIDENTIAL,
UNDER ND
A# 12101050
69r
lq62d-f714peg4 * Memec (Headquar
ters) - Unique
T
ech, Insight, Impact * UNDER ND
A# 12101050
MAR
VELL CONFIDENTIAL - UNA
UTHORIZED DISTRIB
UTION OR USE STRICTL
Y PR
OHIBITED
General-Purpose I/O Unit
Copyright © 12/13/06 Marvell
CONFIDENTIAL
Doc. No. MV-TBD-00 Rev. A
December 13, 2006
Document Classification: Proprietary Information
Page 123
Not approved by Document Control. For review only.
General-Purpose I/O Unit
5
This chapter describes the operation of the general-purpose I/O unit of the PXA300 processor or PXA310
processor.
5.1
Overview
The PXA300 processor or PXA310 processor GPIO module provides 128 general-purpose input/output (GPIO)
ports for use in generating and capturing application-specific input and output. All ports are brought out of the
processor via the alternate function muxing. When programmed as an input, a GPIO port can also serve as an
interrupt source. At the assertion of all resets, all 128 ports are configured as inputs and remain inputs until they
are configured either by the boot process or by user software.
The direction of the GPIO ports are controlled by writing to the GPIO Pin Direction register (GPDRx). When
programmed as an output, the port can be set by writing to the GPIO Pin Output Set register (GPSRx), and
cleared by writing to the GPIO Pin Output Clear register (GPCRx). The set and clear registers can be written
regardless of whether the port is configured as an input or an output. If a port is configured as an input, the
programmed output state takes effect when the port is reconfigured as an output.
The value of each GPIO port can be read through the GPIO Pin-Level register (GPLRx). This register can be
read at any time and can confirm the port state for both input and output configurations. In addition, users can
program each GPIO port to detect a rising and/or falling edge through the GPIO Rising-Edge Detect Enable
register (GRERx), and GPIO Falling-Edge Detect Enable register (GFERx). The state of the edge-detect can be
read through the GPIO Edge Detect Status register (GEDRx). These edge-detects can be programmed to generate
interrupts.
Unlike previous Intel XScale
®
technology processors, the GPIO logic is best thought of as a logical function
only, giving the ability for software to configure and examine the value of a port, and does not control the
selection of which logical function is connected to the actual physical pins. Thus, for the GPIO function on a
particular pin to have effect, both the registers in the GPIO block and the steering for the relevant pin must be
configured correctly. Refer to the “Pin Descriptions and Control” chapter for detailed information regarding
configuring the pins as GPIOs. It is necessary to understand the operation of both the GPIO control logic and the
multi-function pin control logic to understand the operation of the GPIOs in the PXA300 processor or PXA310
processor processor. It is possible for a system to use the GPIO functions internally and not actually connect to a
physical pin.
The registers contained here are reset during non state-retentive power modes and the interrupt events are not
produced during low-power modes and cannot therefore cause wakeup events.