2016-02-08 01:30 AM
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!2016-02-08 08:38 AM
What I meant is that for 8 PWM outputs, I would need 8 separate additional timers to measure each PWM channel overflows. Or did you have something better in mind :P?
Also sorry for the blank posts, this forum doesnt quite work on my mobile phone.2016-02-08 01:24 PM
2016-02-08 01:30 PM
Yes, I gues thats doable... Thank you for the explanation, now I understand. Sorry it took so long.