Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
stm32:peripherals:gpio_alternate [2016/02/25 08:47] feurstm32:peripherals:gpio_alternate [2022/12/28 08:20] (current) ruan
Line 10: Line 10:
 \\ {{gpio_complete.svg}} \\ \\ \\ {{gpio_complete.svg}} \\ \\
  
-===== Configuration Registers =====+===== Programming Instructions =====
  
-==== MODER ====+Depending on the alternate function you have to configure the pins as: 
 +  * [[gpio_input#programming_instructions|digital input]], 
 +  * [[gpio_output#programming_instructions|digital output]] or 
 +  * [[gpio_analog#programming_instructions|analog input]]. 
 +\\ 
 +===== Configuration Registers =====
  
-Mode register+==== GPIOx_MODER - Mode register ====
  
 \\ {{gpio_reg_common.svg}} \\ \\ \\ {{gpio_reg_common.svg}} \\ \\
  
 |< 100% 5em 5em >| |< 100% 5em 5em >|
-|Pinx|01|Output mode (reset state)|+|Pin x|10|Alternate function mode|
  
-==== AFRL/H ==== +==== GPIOx_AFRL/H Alternate function register (low / high) ====
- +
-Alternate function register (low / high)+
  
 \\ {{gpio_reg_afrl.svg}} \\ \\ \\ {{gpio_reg_afrl.svg}} \\ \\
Line 30: Line 33:
 |< 100% 5em 5em>| |< 100% 5em 5em>|
 |Pin x|0000|AF0: RTC, MCO, Tamper, SWJ, Trace| |Pin x|0000|AF0: RTC, MCO, Tamper, SWJ, Trace|
-|:::|0001|Timer 1, [[timer2_5|Timer 2]]| +|:::|0001|AF1: Timer 1, [[timer2_5|Timer 2]]| 
-|:::|0010|[[timer2_5|Timer 3..5]]| +|:::|0010|AF2: [[timer2_5|Timer 3..5]]| 
-|:::|0011|Timer 8..11| +|:::|0011|AF3: Timer 8..11| 
-|:::|0100|I²C 1..3| +|:::|0100|AF4: I²C 1..3| 
-|:::|0101|SPI 1,2,4..6| +|:::|0101|AF5: SPI 1..6| 
-|:::|0110|SPI 3, SAI 1| +|:::|0110|AF6: SPI 2/3, SAI 1| 
-|:::|0111|USART 1..3, I²S 3 Ext+|:::|0111|AF7: SPI 3, USART 1..3| 
-|:::|1000|UART 4..8| +|:::|1000|AF8: USART 6, UART 4/5/7/8| 
-|:::|1001|CAN 1..2, Timer 12..14| +|:::|1001|AF9: CAN 1/2, Timer 12..14, LCD
-|:::|1010|USB OTG HS/FS| +|:::|1010|AF10: USB OTG HS/FS| 
-|:::|1011|Ethernet| +|:::|1011|AF11: Ethernet| 
-|:::|1100|FMC, USB OTG HS/FS, SDIO+|:::|1100|AF12: FMC, SDIO, USB OTG FS| 
-|:::|1101|DCMI| +|:::|1101|AF13: DCMI| 
-|:::|1110|LTDC+|:::|1110|AF14: LCD
-|:::|1111|Event Out|+|:::|1111|AF15: Event Out|
  
-==== PUPDR ==== +==== GPIOx_PUPDR - GPIO port pull-up / pull-down register ====
- +
-Push-up / pull-down register+
  
 \\ {{gpio_reg_common.svg}} \\ \\ \\ {{gpio_reg_common.svg}} \\ \\
Line 58: Line 59:
 |:::|11|Reserved| |:::|11|Reserved|
  
-==== OTYPER ==== +==== GPIOx_OTYPER - Port output type register ====
- +
-Output type register+
  
 \\ {{gpio_reg_otyper.svg}} \\ \\ \\ {{gpio_reg_otyper.svg}} \\ \\
Line 68: Line 67:
 |:::|1|Output type: open-drain| |:::|1|Output type: open-drain|
  
-==== OSPEEDR ==== +==== GPIOx_OSPEEDR - Port output speed register ====
- +
-Output speed register +
  
 \\ {{gpio_reg_common.svg}} \\ \\ \\ {{gpio_reg_common.svg}} \\ \\
Line 80: Line 77:
 |:::|11|Speed: 100 MHz| |:::|11|Speed: 100 MHz|
  
-===== Data Registers ===== 
- 
-There are no data registers available in alternate function mode. \\ 
- 
-===== Legend ===== 
- 
-\\ {{legende.svg}} \\ \\ 
  • stm32/peripherals/gpio_alternate.1456390079.txt.gz
  • Last modified: 2016/02/25 08:47
  • by feur