STM32F2 PWM, Encoder Mode, SPI, Serial Configuration Program