This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM configuration to stop it after x number of pulses

We need to work with the PWM, the idea is to set one frequency, duty 50%, and put out these pulses to one pin, we understand how to do that but we need to stop these pulses after a number x of pulses, one option we think connects it with the event to one-timer to count it and with an ISR stop it. However, we already are using two-timers and we try to avoid using another one.

Do you recommend another solution to stop the PWM or are we missing something?

Thanks

Related