Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| stm32:peripherals:gpio_analog [2016/02/25 07:09] – created feur | stm32:peripherals:gpio_analog [2022/12/28 08:18] (current) – [MODER] ruan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Analog Input ====== | + | ====== Analog Input (GPIO) |
| * The output buffer is disabled. | * The output buffer is disabled. | ||
| * 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 | + | * Reading IDR returns |
| \\ | \\ | ||
| - | ==== Configuration Registers | + | ===== Programming Instructions ===== |
| - | |< 100% 10em >| | + | ==== Enable Peripheral ==== |
| - | |[[gpio# | + | |
| + | Make sure the peripheral is enabled: | ||
| + | * Enable GPIOx in '' | ||
| + | |||
| + | ==== Setup analog input mode ==== | ||
| + | |||
| + | Configure the MODE register, for every pin that should act as analog input: | ||
| + | * Write '' | ||
| + | \\ | ||
| + | |||
| + | ===== Configuration Registers ===== | ||
| + | |||
| + | ==== GPIOx_MODER - Mode register ==== | ||
| + | |||
| + | \\ {{gpio_reg_common.svg}} \\ \\ | ||
| + | |||
| + | |< 100% 5em 5em >| | ||
| + | |Pin x|11|Analog | ||