Скачиваний:
33
Добавлен:
27.04.2015
Размер:
4.9 Mб
Скачать

GPIO Block Diagram

13.1 Introduction

The 56852 General Purpose Input/Output (GPIO) is designed to share package pins with other peripheral modules on the chip. If a peripheral normally controlling a given pin is not required, then the pin can be programmed to be a GPIO with programmable pull-up.

13.2 Features

The GPIO module design includes:

Individual control for each pin to be in either Normal or GPIO mode

Individual direction control for each pin in GPIO mode

Individual pull-up enable control for each pin in either Normal or GPIO mode

13.3 GPIO Block Diagram

 

PE

 

 

I/O Cell

 

 

 

 

 

DD

 

 

GPIO

 

 

0

 

 

D_OUT

 

Pin

 

PE

 

 

 

 

 

 

 

1

 

 

 

 

D_IN

0

 

 

 

Data Register

 

 

Peripheral Data Out

 

1

 

PeripheralChip

 

 

 

Peripheral Out Enable

 

 

 

 

Peripheral Data In

 

 

PE

 

 

 

 

On-

 

 

1

 

 

 

 

 

 

 

DD

0

PU

 

Figure 13-1. Bit-Slice View of GPIO Logic

General Purpose Input/Output (GPIO), Rev. 4

Freescale Semiconductor

13-3

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Functional Description

Table 13-1. Mapping of External Signals to GPIO Ports

Peripheral

Functional

GPIO Port

GPIO Bit

Signal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EMI

 

 

 

 

 

A

2

 

CS2

 

 

 

 

 

 

 

 

EMI

 

 

 

 

 

A

1

 

CS1

 

 

 

 

 

 

 

 

EMI

 

 

 

 

 

A

0

 

CS0

 

 

 

 

SPI

MOSI

C

5

 

 

 

 

SPI

MISO

C

4

 

 

 

 

 

 

 

SPI

 

 

 

 

C

3

 

 

SS

 

 

 

 

ISSI

SCLK

C

2

 

 

 

 

ISSI

SRXD

C

1

 

 

 

 

ISSI

STXD

C

0

 

 

 

 

SCI

TXD

E

1

 

 

 

 

SCI

RXD

E

0

 

 

 

 

 

 

 

 

13.4 Functional Description

Each GPIO pin can be configured as either an input, with or without pull-up, or an output. Pull-ups are configured by writing to the Pull-Up Registers and are automatically disabled when the pin is being used as an output in either the Normal or GPIO modes of operation.

13.5 Modes of Operation

The GPIO module design contains two major modes of operation:

13.5.1 Normal Mode

This can also be thought of as Peripheral Controlled mode. The peripheral module controls the output enable and any output data to the I/O pad and any input data from the pad is passed to the peripheral. Pull-up enables are controlled by a GPIO register.

13.5.2 GPIO Mode

In this mode, the GPIO module controls the output enable to the pad and supplies any data to be output. Also, any input data can be read from a GPIO memory mapped register. Pull-up enables are controlled by a GPIO register.

 

56852 Digital Signal Controller User Manual, Rev. 4

13-4

Freescale Semiconductor

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Module Memory Maps

In the GPIO mode, the Data Direction Register (DDR) supplies the output enable to the I/O pad to control its direction. The DR supplies the output data if DDR is asserted. The value of the data on the I/O pad can be read by reading Data Register (DR) when DDR is zero. When in GPIO mode the output data from the GPIO to the peripheral module will be driven high and the output data and enable from the peripheral are ignored. The pull-up resistor can be enabled by writing to the PUE Register. The pull-up resistor will be disabled as long as the DDR is set to the Output mode.

13.6 GPIO Configurations

Each GPIO port is controlled by the registers listed in Section 13-2. Each register bit corresponds to a GPIO pin. Figure 13-1 illustrates the logic associated with one GPIO bit.

Table 13-2. GPIO Registers Functions

Register

Description

Function

 

 

 

 

 

 

PER

Peripheral Enable Register

Determines if pin functions as GPIO or associated peripheral pin

 

 

 

DDR

Data Direction Register

Determines pin direction (input or output) when pin functions as GPIO

 

 

 

DR

Data Register

Data interface between the GPIO pin and the IPBus

 

 

 

PUER

Pull-Up Enable Register

Enables internal pull-up, qualified by other factors

 

 

 

13.7 Module Memory Maps

There are three GPIO mapped modules listed in the following in tables, Section 13-3 through Section 13-5. The GPIO peripherals are summarized in Figure 13-2 through Figure 13-4.

Table 13-3. GPIO A Memory Map (GPIOA_BASE = $1FFE60)

Address Offset

Register Acronym

Register Name

Access Type

Chapter Location

 

 

 

 

 

Base + $0

GPIO_A_PER

Peripheral Enable Register

Read/Write

Section 13.8.1

 

 

 

 

 

Base + $1

GPIO_A_DDR

Data Direction Register

Read/Write

Section 13.8.4

 

 

 

 

 

Base + $2

GPIO_A_DR

Data Register

Read/Write

Section 13.8.7

 

 

 

 

 

Base + $3

GPIO_A_PUR

Pull-Up Enable Register

Read/Write

Section 13.8.10

 

 

 

 

 

 

General Purpose Input/Output (GPIO), Rev. 4

Freescale Semiconductor

13-5

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Module Memory Maps

Add.

Register Name

 

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

 

0

Offset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$0

PER

R

1

1

1

1

1

1

1

1

1

1

1

1

1

 

PE

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$1

DDR

R

0

0

0

0

0

0

0

0

0

0

0

0

0

 

DD

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$2

DR

R

0

0

0

0

0

0

0

0

0

0

0

0

0

 

DATA

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$3

PUR

R

1

1

1

1

1

1

1

1

1

1

1

1

1

1

PUE

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read as 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W

 

Reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 13-2. GPIO A Register Map Summary

Table 13-4. GPIO C Memory Map (GPIOC_BASE = $1FFE68)

Address Offset

Register Acronym

Register Name

Access Type

Chapter Location

 

 

 

 

 

Base + $8

GPIO_C_PER

Peripheral Enable Register

Read/Write

Section 13.8.2

 

 

 

 

 

Base + $9

GPIO_C_DDR

Data Direction Register

Read/Write

Section 13.8.5

 

 

 

 

 

Base + $A

GPIO_C_DR

Data Register

Read/Write

Section 13.8.8

 

 

 

 

 

Base + $B

GPIO_C_PUR

Pull-Up Enable Register

Read/Write

Section 13.8.11

 

 

 

 

 

Add.

Register Name

 

15

14

13

12

11

10

9

8

7

6

5

4

3

 

2

1

0

Offset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$8

PER

R

1

1

1

1

1

1

1

1

1

1

 

 

 

PE

 

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$9

DDR

R

0

0

0

0

0

0

0

0

0

0

 

 

 

DD

 

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$A

DR

R

0

0

0

0

0

0

0

0

0

0

 

 

DATA

 

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$B

PUR

R

1

1

1

1

1

1

1

1

1

1

 

 

 

PUE

 

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read as 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W

 

Reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 13-3. GPIO C Register Map Summary

 

56852 Digital Signal Controller User Manual, Rev. 4

13-6

Freescale Semiconductor

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Соседние файлы в папке DSP568xx