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_analog [2016/02/25 08:50] feurstm32:peripherals:gpio_analog [2022/12/28 08:18] (current) – [MODER] ruan
Line 4: Line 4:
   * The Schmitt trigger input is inactive.   * The Schmitt trigger input is inactive.
   * The pull-up and -down resitors are inactive.   * The pull-up and -down resitors are inactive.
-  * Reading [[gpio#registers|IDR]] gets "0".+  * Reading IDR returns "0".
  
 \\ \\
  
-===== Configuration Registers =====+===== Programming Instructions =====
  
-==== MODER ====+==== Enable Peripheral ====
  
-Mode register+Make sure the peripheral is enabled: 
 +  * Enable GPIOx in ''RCC->AHBENR[0]''.
  
-\\ {{gpio_reg_common.svg}} \\ \\+==== Setup analog input mode ====
  
-|< 100% 5em >| +Configure the MODE register, for every pin that should act as analog input: 
-|00|Input mode (reset state)|+  * Write ''0x10'' to the corresponding fields in ''GPIOx->MODE''. 
 +\\
  
-===== Data Registers =====+===== Configuration Registers ===== 
 + 
 +==== GPIOx_MODER - Mode register ==== 
 + 
 +\\ {{gpio_reg_common.svg}} \\ \\
  
-There are no data registers available in alternate function mode. \\+|< 100% 5em 5em >| 
 +|Pin x|11|Analog input mode|
  • stm32/peripherals/gpio_analog.1456390237.txt.gz
  • Last modified: 2016/02/25 08:50
  • by feur