EasyManuals Logo

ST STM32F31xx User Manual

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
Page #242 background imageLoading...
Page #242 background image
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

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals