STM32 controller: GPIO_SetBits doesn't seem to have any effect
Here is the problem:

GPIOa.GPIO_Mode = GPIO_Speed_2MHz;


Should be

GPIOa.GPIO_Speed = GPIO_Speed_2MHz;


Very dumb. 8 hours of life wasted :(