Sorry, forgot to mention that. I'll be running 2 servo motors and
2 brush-less dc motors.
I am concerned about the fact that all of them will be running at
different frequencies and in parallel. So far I can only think of
running them one after the other. Is there a way to thread in a
PRU?
I'll have a look at the link you mentioned and see if it helps.
Thanks
The reason I wanted to use the PRU was that we need to send a fixed number of pulses to the servo motors. We tried it with the usual PWM channels on the beaglebone and by the time we are done counting the number and disabling the PWM, the servo ends up receiving a few extra pulses and overshooting. Maybe comparing it in a while loop is not such a great idea. If there is a better way that does not involve the use of PRUs, I would readily switch to that.
Also, Mark, a small
part I didn’t understand in pru-pwm.asm.
Once you load the period and duty cycle in channel,
only some should get either enabled or disabled each cycle. How
do you decide which ones to set high and low?
Adwait