09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RM0090</strong> General-purpose I/Os (GPIO)<br />

Each I/O port bit is freely programmable, however the I/O port registers have to be accessed<br />

as 32-bit words, half-words or bytes. The purpose of the GPIOx_BSRR register is to allow<br />

atomic read/modify accesses to any of the GPIO registers. In this way, there is no risk of an<br />

IRQ occurring between the read and the modify access.<br />

Figure 17 shows the basic structure of a 5 V tolerant I/O port bit. Table 31 gives the possible<br />

port bit configurations.<br />

Figure 17. Basic structure of a five-volt tolerant I/O port bit<br />

To on-chip<br />

peripheral<br />

Read<br />

Write<br />

Read/write<br />

From on-chip<br />

peripheral<br />

1. V DD_FT is a potential specific to five-volt tolerant I/Os and different from V DD .<br />

Table 27. Port bit configuration table (1)<br />

MODER(i)<br />

[1:0]<br />

01<br />

Bit set/reset registers<br />

Analog<br />

Alternate function input<br />

Output data register<br />

Input data register<br />

Alternate function output<br />

OTYPER(i)<br />

Input driver<br />

Output driver<br />

OSPEEDR(i)<br />

[B:A]<br />

on/off<br />

TTL Schmitt<br />

trigger<br />

Output<br />

control<br />

PUPDR(i)<br />

[1:0]<br />

Push-pull,<br />

open-drain or<br />

disabled<br />

on/off<br />

on/off<br />

I/O configuration<br />

0<br />

0 0 GP output PP<br />

0 0 1 GP output PP + PU<br />

0 1 0 GP output PP + PD<br />

0 SPEED 1 1 Reserved<br />

1 [B:A]<br />

0 0 GP output OD<br />

1 0 1 GP output OD + PU<br />

1 1 0 GP output OD + PD<br />

1 1 1 Reserved (GP output OD)<br />

V DD<br />

V SS<br />

P-MOS<br />

N-MOS<br />

Doc ID 018909 Rev 3 186/1416<br />

V DD<br />

V SS<br />

Analog<br />

Pull<br />

up<br />

Pull<br />

down<br />

V DD_FT (1)<br />

V SS<br />

Protection<br />

diode<br />

I/O pin<br />

Protection<br />

diode<br />

ai15939b

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!