The Stm32f103 Arm Microcontroller And Embedded Systems Work Official

PWM example (TIM2, Channel 1 on PA0):