Userland access to PWM?

Olli Mannisto
New Member Posts: 7
There's a guide for setting up permissions to allow userland access to SPI/I2C and GPIO. However PWM seems to require root.. MRAA library does support PWM on UP^2 but it requires root permissions to work properly.
Would there be a way to set up userland access to the PWM like with the other examples?
Would there be a way to set up userland access to the PWM like with the other examples?
Comments
-
Right, I had totally forgotten PWM. I can look into it later, but it's probably gonna have to wait until tomorrow.
-
No can do. The Linux-kernel doesn't notify udev when you export a PWM-controller and so there's no sensible method for setting the permissions correctly with udev. There have been some random patches for this that people have tried to get into upstream, but doesn't look like any of them have actually been accepted, and even if they had, the kernel provided by the UP-team is too old to have it.
-
Ok, thanks anyways.
Too bad I don't know how to make a service for this, otherwise I could start it as root and just pass the desired duty cycle from userland.
Categories
- All Categories
- 105 Announcements & News
- 54 Product News - New Product/Product Change Notice/ End-of-life
- 186 Welcome Developers!
- 55 Unboxing & Project Sharing
- 50 Tech Updates
- 693 UP Products
- 11 UP 7000
- 1 UP Squared i12
- 10 UP Xtreme i12
- 11 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 19 UP Squared V2
- 59 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 60 UP Squared Pro
- 143 UP Xtreme
- 837 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 216 Starter Kits & Peripheral