PWM Using Timers

The STM32F103C8T6 has four hardware timers that can be used to generate PWM signals to drive servos. Ninjaskit has two classes (Pulse1 and Pulse2) that wrap two of the hardware timers to produce PWM on up to four digital pins each. For Pulse1 these pins are PA0, PA1, PA2 and PA3. For Pulse2 they are PA6, PA7, PB0 and PB1.

Here’s a code example


Leave a Reply

Your email address will not be published. Required fields are marked *