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 />

7.3.2 I/O pin multiplexer and mapping<br />

The microcontroller I/O pins are connected to onboard peripherals/modules through a<br />

multiplexer that allows only one peripheral’s alternate function (AF) connected to an I/O pin<br />

at a time. In this way, there can be no conflict between peripherals sharing the same I/O pin.<br />

Each I/O pin has a multiplexer with sixteen alternate function inputs (AF0 to AF15) that can<br />

be configured through the GPIOx_AFRL (for pin 0 to 7) and GPIOx_AFRH (for pin 8 to 15)<br />

registers:<br />

● After reset all I/Os are connected to the system’s alternate function 0 (AF0)<br />

● The peripherals’ alternate functions are mapped from AF1 to AF13<br />

● Cortex-M4F EVENTOUT is mapped on AF15<br />

This structure is shown in Figure 18 below.<br />

In addition to this flexible I/O multiplexing architecture, each peripheral has alternate<br />

functions mapped onto different I/O pins to optimize the number of peripherals available in<br />

smaller packages.<br />

To use an I/O in a given configuration, proceed as follows:<br />

1. System function<br />

Connect the I/O to AF0 and configure it depending on the function used:<br />

– JTAG/SWD, after each device reset these pins are assigned as dedicated pins<br />

immediately usable by the debugger host (not controlled by the GPIO controller)<br />

– RTC_REFIN: this pin should be configured in Input floating mode<br />

– MCO1 and MCO2: these pins have to be configured in alternate function mode.<br />

Note: You can disable some or all of the JTAG/SWD pins and so release the associated pins for<br />

GPIO usage.<br />

For more details please refer to Section 6.2.10: Clock-out capability.<br />

Doc ID 018909 Rev 3 188/1416

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

Saved successfully!

Ooh no, something went wrong!