4.1.2. GPIO registers

The GPIO provides general-purpose input and output signals that are connected to J20. Each GPIO line has a 10KΩ pullup resistors to 3.3V. The GPIO registers are shown in Table 4.1.

Table 4.1. GPIO register summary

Address

Name

Type

Size

Function

0xC9000000

GPIO_DATASET

Write

8

Data output set

GPIO_DATAIN

Read

8

Read data input pins

0xC9000004

GPIO_DATACLR

Write

8

Data register output clear

GPIO_DATAOUT

Read

8

Read data output pins

0xC9000008

GPIO_DIRN

Read/write

8

Data direction

Data output set register

The GPIO_DATASET location is used to set individual GPIO output bits as follows:

  • 1 = SET the associated GPIO output bit

  • 0 = leave the associated GPIO bit unchanged.

Read data input register

Read the current state of the GPIO pins from this location.

Data register output clear

The GPIO_DATACLR location is used to clear individual GPIO output bits as follows:

  • 1 = CLEAR the associated GPIO output bit

  • 0 = leave the associated GPIO bit unchanged.

Read data output pins

Read the current state of the GPIO output register bits from this location.

Data direction

The GPIO_DIRN location is used to set the direction of each GPIO pin as follows:

  • 1 = pin is an output

  • 0 = pin is an input (default).

Figure 4.1 shows the data direction control for one GPIO bit.

Figure 4.1. GPIO direction control (1 bit)

Copyright © 2002 ARM Limited. All rights reserved.ARM DUI 0159B
Non-Confidential