AnsweredAssumed Answered

Count PWM pulses

Question asked by Lukasz Przenioslo on Feb 8, 2016
Latest reply on Feb 8, 2016 by Lukasz Przenioslo
Hello there,
I am using STM32F4. I was wondering either it is possible to count the PWM rising or falling edges that the mcu generates. I know that I could connect the PWM output to anothers timer input trigger pin and do it this way. But I am using 8 PWM output channel so I would additionaly need 8 input capture channels (dunno how many timers is needed for that yet, hope less than 8). I could also generate an interrupt for each pwm channel to increment a variable in the interrupt routine but that would be really heave for the MCU if I had 8 pwm channels running 10kHz each.

Is it possible maybe, to somehow hook up timers internally to get this functionality I am looking for? Or using DMA maybe? I cannot think of anything better than external pin connection. I would apreciate all help!

Outcomes