Alternate functionality setting of GPIO pin with example
When GPIO pin is in alternate functionality mode, it can be used for 16 different functionalities from AF0 to AF15. These possible 16 different functionalities are, used for system-related tasks, used by the timer peripherals, used by SPI or I2C peripherals and also for audio interfaces.
Example: List out all 16 possible alternate functionalities supported by GPIO port ‘A’ PIN ‘8’ (GPIOA.8)
For GPIOA.8,
For AFO: MCO1
For AF1: TIM1_CH1.
For AF2: – (Not defined, behaves as standard GPIO).
For AF3: – (Not defined, behaves as standard GPIO).
For AF4: – I 2C3_SCL.
For AF5: – (Not defined, behaves as standard GPIO).
For AF6: – (Not defined, behaves as standard GPIO).
For AF7: – USART1_CK
For AF8: – (Not defined, behaves as standard GPIO).
For AF9: – (Not defined, behaves as standard GPIO).
For AF10:- OTG_FS_SOF
For AF11: – (Not defined, behaves as standard GPIO).
For AF12: – (Not defined, behaves as standard GPIO).
For AF13: – (Not defined, behaves as standard GPIO).
For AF14: – (Not defined, behaves as standard GPIO).
For AF15:- EVENT OUT
In the following article, let’s see Enabling and disabling GPIO peripheral clock.
FastBit Embedded Brain Academy Courses,
Click here: https://fastbitlab.com/course1