Question
STM32f0 Modulated Timer PWM
Posted on November 24, 2013 at 18:27
Hi,
I am playing around with the STM32f0 discovery board. The timers are very powerful but the reference manual is quite rough about some interesting aspects of those and I have a hard time figuring how to achieve my goal.I am trying to generate 2 different PWM's for modulating bit patterns. Base frequency is the same, only duty cycle differs. I know how to generate these ''stand alone'' on two different pins, but I want to use only one pin that changes its PWM according to the actual bit value.Bit value 1 would modulate pwm1 and bit value 0 pwm2.To add some more complexity I'd like to use (somehow) DMA to load the next waveform automatically to the timer without interrupt intervention, so I could let STM32 do this automatically without burdening CPU with high interrupt load.If I would use some external logic I would connect the two PWM's to a multiplexer and modulate it via SPI with the bit patterns to choose either PWM1 or PWM2.But is this possible with built-in means of the STM32f0, maybe with help of the comparator ?