4.3.9 GPIO alternate functions

GPIO alternate functions are used to support two sets of Arduino shield expansion peripherals.

The 52-pin expansion port (EXP port) is driven from GPIO0-3. For each pin, the relevant bit of ALTFUNC must be set to use the alternate function. If this bit is not set to use the alternate function, the pin is used for GPIO. You can control the ALTFUNC bits using the ALTFUNCSET and ALTFUNCCLR registers of each GPIO.

The GPIO alternate functions use the following pins:

Table 4-18 GPIO alternate functions

EXP pin number GPIO pin Description
0 GPIO0[0] UART2 (Shield0) Rx data
4 GPIO0[4] UART2 (Shield0) Tx Data
26 GPIO1[10] UART3 (Shield1) Rx Data
30 GPIO1[14] UART3 (Shield1) Tx Data
23 GPIO1[7] UART4 Tx data
24 GPIO1[8] UART4 Rx Data
5 GPIO0[5] Shield0 SCL (I2S)
15 GPIO0[15] Shield0 SDA (I2S)
31 GPIO1[15] Shield1 SCL (I2S)
41 GPIO2[9] Shield1 SDA (I2S)
11 GPIO0[11] Shield0 SCK (SPI)
12 GPIO0[12] Shield0 CS_n (SPI)
13 GPIO0[13] Shield0 MOSI (SPI)
14 GPIO0[14] Shield0 MISO (SPI)
44 GPIO2[12] Shield1 SCK (SPI)
38 GPIO2[6] Shield1 CS_n (SPI)
39 GPIO2[7] Shield1 MOSI (SPI)
40 GPIO2[8] Shield1 MISO (SPI)
19 GPIO1[3] Shield ADC SCK (SPI)
16 GPIO1[0] Shield ADC CS_n (SPI)
18 GPIO1[2] Shield ADC MOSI (SPI)
17 GPIO1[1] Shield ADC MISO (SPI)
Non-ConfidentialPDF file icon PDF versionARM 100894_0000_00_en
Copyright © 2017 ARM Limited or its affiliates. All rights reserved.