Make sure the peripheral is enabled:
RCC→AHBENR[0].
Configure the MODE and PUPDR as well as the output type and speed register,
for every pin that should act as digital output:
0x01 to the corresponding fields in GPIOx→MODE.GPIOx→PUPDR.GPIOx→OTYPER. GPIOx→PUPDR)GPIOx→OSPEEDR.