hzeller / beagleg

G-code interpreter and stepmotor controller for crazy fast coordinated moves of up to 8 steppers. Uses the Programmable Realtime Unit (PRU) of the Beaglebone.
http://beagleg.org/
GNU General Public License v3.0
122 stars 51 forks source link

Explore if eHRPWM can also be used for PWM generation #25

Open hzeller opened 7 years ago

hzeller commented 7 years ago

Currently, we only support the Timer pins for PWM generation. But there is also other PWM dedicated hardware in the am335x (eHRPWM), which we also should support if possible. This would also expand the available Pins people can use for PWM (see limit mentioned in #24)

bigguiness commented 7 years ago

Take a look at this: https://github.com/beagleboard/bb.org-overlays/blob/master/examples/cape-unversal-pwm.txt Maybe we could use this approach as a start for the ehrpwm pins?

darenschwenke commented 7 years ago

Might I suggest taking a look at: https://github.com/machinekit/machinekit/tree/master/src/hal/drivers/hal_pru_generic

dgouramanis commented 7 years ago

I can not get ehrpwm working at all with certain pins using Debian 8 and 4x kernel. I posted about the issue here. https://github.com/rust-embedded/rust-sysfs-pwm/issues/2