Analog Input (GPIO)
- The output buffer is disabled.
- The Schmitt trigger input is inactive.
- The pull-up and -down resitors are inactive.
- Reading IDR returns “0”.
Programming Instructions
Enable Peripheral
Make sure the peripheral is enabled:
- Enable GPIOx in
RCC→AHBENR[0]
.
Setup analog input mode
Configure the MODE register, for every pin that should act as analog input:
- Write
0x10
to the corresponding fields inGPIOx→MODE
.