Make sure the peripheral is enabled:
RCC→AHBENR[0]
Configure the MODE and PUPDR register, for every pin that should act as digital input:
0x00
GPIOx→MODE
GPIOx→PUPDR
* Register is read only