mraa icon indicating copy to clipboard operation
mraa copied to clipboard

Beaglebone Black - PWM does not work

Open nick-atmosphereiot opened this issue 7 years ago • 8 comments

On the beaglebone black, your code is looking for a path like /sys/class/pwm/pwm6/export, when the newer kernels instead expose /sys/class/pwm/pwmchip6.

Comparing your library with the adafruit bbio library, your mappings seem to be different as well.

Is there any chance you could tell me what image was on the beaglebone this stuff was tested on?

nick-atmosphereiot avatar May 26 '17 18:05 nick-atmosphereiot

You probably want an answer from: @svlstriker @michael-ring. I'm not sure what they used however docs/beaglebone.md indicate a 3.8.13 debian image.

arfoll avatar May 28 '17 06:05 arfoll

That code may have been based on some old vendor kernel. Upstream Linux always used the pwmchipN/pwmX hierarchy, so did the pwm subsystem of mraa. Time to fix the board code, I would say. There is no point in hunting down the historic system this once worked on - if it did so at all.

jan-kiszka avatar May 28 '17 10:05 jan-kiszka

More precisely, upstream gained pwn sysfs with 3.11 in 2013 - which means 3.8 was nothing official. The old problem of relying on downstream APIs.

jan-kiszka avatar May 28 '17 10:05 jan-kiszka

Unfortunately I don't even have a bbb. That code comes from the contributors above. I'm surprised though because phytec have been advertising mraa support on their BBB clone surely they're not using an ancient 3.8 kernel... Here's to hoping!

On 28 May 2017 12:52, "Jan Kiszka" [email protected] wrote:

More precisely, upstream gained pwn sysfs with 3.11 in 2013 - which means 3.8 was nothing official. The old problem of relying on downstream APIs.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/intel-iot-devkit/mraa/issues/746#issuecomment-304506453, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfZZlfUeY7DCra9I6sz6Rk_4unzxB7eks5r-VH2gaJpZM4Nn8WQ .

arfoll avatar May 28 '17 10:05 arfoll

Is there support for 4.x kernels with other boards?

I am planning on trying to fix the BBB code based on the Adafruit library. I will make a PR when/if I get something usable.

nick-atmosphereiot avatar May 30 '17 13:05 nick-atmosphereiot

For sure, Intel Joule & Minnowboard Turbot definately support 4.x kernels. On the arm side I think the pi3 kernel is pretty new but dont have one to hand to be 100%

arfoll avatar May 30 '17 13:05 arfoll

I am currently working with BBB and PWM. I created a workaround using low level kernel calls. Not a very elegant solution. I would rather get an MRAA version that works than to use my ugly work-around. It looks like PR #273 may be a fix for this. Any status on getting a new PR or update for the PWM problem?

Chuckduey avatar Oct 02 '18 21:10 Chuckduey

I ended up writing a solution, and it was merged here: https://github.com/intel-iot-devkit/mraa/pull/750

If you're having a problem, I would suggest opening up a new issue instead of this super old one.

nick-atmosphereiot avatar Oct 02 '18 22:10 nick-atmosphereiot