EasyManua.ls Logo

ST STM32F31xx

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
General-purpose I/Os (GPIO)
UM1581
242/584
DocID023800 Rev 1
Function Description
Writes data to the specified GPIO data port.
Parameters
GPIOx : where x can be (A, B, C, D, E or F) to select the
GPIO peripheral.
GPIO_PinSource : specifies the pin for the Alternate
function. This parameter can be GPIO_PinSourcex where x
can be (0..15).
GPIO_AF : selects the pin to be used as Alternate function.
This parameter can be one of the following value:
GPIO_AF_0 : JTCK-SWCLK, JTDI, JTDO/TRACESW0,
JTMS-SWDAT, MCO, NJTRST, TRACED, TRACECK.
GPIO_AF_1 : OUT, TIM2, TIM15, TIM16, TIM17.
GPIO_AF_2 : COMP1_OUT, TIM1, TIM2, TIM3, TIM4,
TIM8, TIM15.
GPIO_AF_3 : COMP7_OUT, TIM8, TIM15, Touch.
GPIO_AF_4 : I2C1, I2C2, TIM1, TIM8, TIM16, TIM17.
GPIO_AF_5 : IR_OUT, I2S2, I2S3, SPI1, SPI2, TIM8,
USART4, USART5
GPIO_AF_6 : IR_OUT, I2S2, I2S3, SPI2, SPI3, TIM1,
TIM8
GPIO_AF_7 : AOP2_OUT, CAN, COMP3_OUT,
COMP5_OUT, COMP6_OUT, USART1, USART2,
USART3.
GPIO_AF_8 : COMP1_OUT, COMP2_OUT,
COMP3_OUT, COMP4_OUT, COMP5_OUT,
COMP6_OUT.
GPIO_AF_9 : AOP4_OUT, CAN, TIM1, TIM8, TIM15.
GPIO_AF_10 : AOP1_OUT, AOP3_OUT, TIM2, TIM3,
TIM4, TIM8, TIM17.
GPIO_AF_11 : TIM1, TIM8.
GPIO_AF_12 : TIM1.
GPIO_AF_14 : USBDM, USBDP.
GPIO_AF_15 : OUT.
Return values
None.
Notes
The pin should already been configured in Alternate Function
mode(AF) using GPIO_InitStruct->GPIO_Mode =
GPIO_Mode_AF
Refer to the Alternate function mapping table in the device
datasheet for the detailed mapping of the system and
peripherals alternate function I/O pins.
12.3 GPIO Firmware driver defines
12.3.1 GPIO
GPIO
GPIO_Alternate_function_selection_define
#define: GPIO_AF_0 ((uint8_t)0x00)

Table of Contents

Related product manuals