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

Need info on PyBBIO internals - PWM analogWrite #52

Closed
kevin-george opened this issue Nov 15, 2014 · 3 comments
Closed

Need info on PyBBIO internals - PWM analogWrite #52

kevin-george opened this issue Nov 15, 2014 · 3 comments

Comments

@kevin-george
Copy link

Hi, I've found that the the analogWrite function is using the sysfs interface for generating PWM instead of /dev/mem as mentioned on the wiki. Is this is a work in progress or am i looking at the wrong file?
File i found was -> bbio/platform/beaglebone/bone_3_8/pwm.py

@alexanderhiam
Copy link
Member

mmap was used for GPIO and the ADC on the 3.2 kernel, and was never used for PWM. Everything is being done through sysfs now to keep the kernel drivers happy. Where are you seeing that in the wiki?

@kevin-george
Copy link
Author

Ohh ok, well i read this on the main wiki page "PyBBIO works by reading and writing directly to the /dev/mem special file, and therefore it needs root privileges to run." and assumed this.
Also, what is this about keeping the kernel drivers happy? I've just started working with eLinux and hence the confusion.

@alexanderhiam
Copy link
Member

Hmm... I think I'm a little late answering... sorry about that!

By "keeping the kernel drivers happy" I'm referring to the fact that you don't want to change the state of a hardware subsystem if a currently loaded kernel driver is using it, as it will then be in a different state then the driver thinks it is and bad things will happen.

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

2 participants