Comments (7)
It referenced in multiple pages, at this blog, and here. These export tables worked for me from bash and python.
Tomorrow I'll look into loading the pwm modules from .dtbo and I'll check the pwmchip - pmw mappings again. As I was unable to export any other than pwm0 and pwm1 from any pwmchip so far.
from rust-sysfs-pwm.
A couple of things:
- For PWM to work on pins, you'll need to make sure that your device tree is set up to enable PWM on pins. For P9.22, you will need to confirm that the device tree muxes that pin as mode 3, ehrpwm0A.
- Here's what I usually refer back to for mappings now that I have created it for another project: https://github.com/rust-embedded/gpio-utils/blob/master/examples/beaglebone.toml
from rust-sysfs-pwm.
Thank you, @posborne !
I'll look into 1).
I watched this mapping after I read in #1 . It was a bit confusing as P9.23 is named EHRPWM0A.
I found this mapping before:
export number pin name pins
0 EHRPWM0A P9.22,P9.31
1 EHRPWM0B P9.21,P9.29
2 ECAPPWM0 P9.42
3 EHRPWM1A P9.14,P8.36
4 EHRPWM1B P9.16,P8.34
5 EHRPWM2A P8.19,P8.45
6 EHRPWM2B P8.13,P8.46
7 ECAPPWM2 P9.28
I'm not sure how it maps to pwmchip# as each chip allows me to export pmwchip#/pwm0 and pwmchip#/pwm1. Could it be associated with 1)?
Sorry for my lame questions, I'm new to embedded linux and rust in general.
from rust-sysfs-pwm.
Ah, maybe the PWM exports and exports for GPIO are separate (that is likely the case). Where is the table you reference from?
from rust-sysfs-pwm.
I am struggling with a similar problem. I am not using Rust, rather beaglebone-universal-io. My two pins are P9.29 and P9.42. I have managed to get P9.42 working, following the same instructions @zen3ger did here. P9.29 shows up in the /sys/ directory, but wont output signals. I am starting to think it may be a kernel bug, because I am using a very recent release (kernel 4.9.14 bone). What kernel are you using?
from rust-sysfs-pwm.
I used to try it on Debian 8, unfortunately I don't know the kernel version. Currently I have Debian 7 with 3.8.13-bone67 kernel having similar issues. As you said, I can export but I get no output on the pin.
I've read it before that PWM tend to not work on 4.x kernels, also there was some change in mappings which needed to be patched. I would point you to it but my laptop died and lost all my saved stuff.
from rust-sysfs-pwm.
I was told the 4x kernels have many differences from the 3x kernels, "loading overlays, names of drivers, locations of things in /sysfs ... ". One driver in specific "uio_pruss" or " remote-proc" varies among kernels. I find it surprising Beaglebone official images would not support ehrpwm, on the other hand maybe there is work in progress. Its probably more likely I'm missing something simple here....
from rust-sysfs-pwm.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-sysfs-pwm.