Question
How to generate exact number of pwm pulses?
hi,
I am working on a stepper motor driver with stm32f407. Facing a challenge in generating exact number of steps for driving the motor. Now what i have done is, i shorted a pwm generating pin with input capture and stops the pwm generation once the input capture reaches the pulse count.
my question is
- At higher frequency will there be any issues if i drive 6 steppers same time. I am stopping the pwm inside the input capture cal back.
- Is there any better way to remove the necessity of input capture and can generate exact number of pwm signals?. note that frequency must be an unavoidable factor, i need to generate pulses at fixed calculated frequencies.
Thanks