Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use 2 PWMs #49

Closed
daguej opened this issue Jul 27, 2013 · 7 comments
Closed

Can't use 2 PWMs #49

daguej opened this issue Jul 27, 2013 · 7 comments
Assignees

Comments

@daguej
Copy link

daguej commented Jul 27, 2013

If I try to use EHRPWM1A and EHRPWM1B:

b.pinMode('P9_14', b.OUTPUT);
b.pinMode('P9_16', b.OUTPUT);

b.analogWrite('P9_14', 0.5, 100);
b.analogWrite('P9_16', 0.5, 100);

...whichever is initialized second doesn't work. If I look in /sys/devices/ocp.2,

# ls pwm*
pwm_test_P9_14.14:
driver  duty  modalias  period  polarity  power  run  subsystem  uevent

pwm_test_P9_16.15:
modalias  power  subsystem  uevent
@ghost ghost assigned jadonk Aug 1, 2013
@jadonk
Copy link
Owner

jadonk commented Aug 19, 2013

I've confirmed that use of the PWM requires some specific period settings that the BoneScript library is violating. Here's the kernel log:
[10262.983541] ehrpwm 48302200.ehrpwm: Period value conflicts with channel 0
[10262.990960] pwm_test pwm_test_P9_16.16: pwm_config() failed
[10263.010070] pwm_test: probe of pwm_test_P9_16.16 failed with error -22
[10263.010171] bone-capemgr bone_capemgr.8: slot #10: Applied #2 overlays.

I believe that I'll need to autogenerate the .dts file to work around this limitation in the driver.

@daguej
Copy link
Author

daguej commented Aug 20, 2013

Thanks for looking in to this

@jadonk
Copy link
Owner

jadonk commented Jan 17, 2014

Issue still exists in 0.2.4, but I know how to fix it.

@tovwiv
Copy link

tovwiv commented Jun 30, 2015

any update on this? ran into this exact issue today

@adityapatadia
Copy link
Contributor

May be you can try https://www.npmjs.com/package/octalbonescript

@NikolaMorena
Copy link

Workaround: use pins that are not connected with same EHRPWM module, e.g. P9_14 and P8_13

@jadonk
Copy link
Owner

jadonk commented Apr 25, 2018

This issue was moved to beagleboard#15

@jadonk jadonk closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants