On Fri, Oct 11, 2019 at 3:49 PM Co M <[email protected]> wrote: > > This is on BBB Linux beaglebone 4.14.108-ti-r108 > > On this new kernel I can see that cape_universal is being used in > /boot/uEnv.txt so all, or quite of pwm's > are on in /sys/class/pwm/pwmchip# > > Some of the pwms like GPIO 71 P8-46 used to be on pwmchip6/pwm1 > but now exporting 1 > gpiochip6 says no device. > > Based on this utility https://redypis.org/addons/bb_pins.php which uses the > bash array from config_pin I can see > that p8_46 is on 0x3:ehrpwm2B which is EHRPWM2 (ePWM2) which is pwmchip6 > channel B > so export 1 (B) should work but now does not . > > Furthermore more going to chips 6 folder and exporting 0 or un-exporting > makes the gpio-6.0 going on and off which is fine, but > any attempt to write onto it fails > > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 100000 ./duty_cycle > 100000 ./duty_cycle > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 100000 > ./duty_cycle > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 100000 > enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 1 > enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ config-pin P8.46 pwm > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 1 > enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 0 > enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 0 > ./enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 10000 > enable > -bash: echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 10000 ./duty_cycle > 10000 ./duty_cycle > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ echo 10000 > ./duty_cycle > > > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ sudo echo 1 > enable > [sudo] password for marius: > echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ sudo echo on > enable > echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ sudo echo default > enable > echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ sudo echo okay > enable > echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ sudo echo true > enable > echo: write error: Invalid argument > marius@beaglebone:/sys/class/pwm/pwmchip6/pwm-6:0$ uname -a > > Is there any updated information or I have to look into the dts file and > figure it out ? > Is there any way to find the mapping from the sys filesystem between the > KERNEL GPIO# -- PX.Y (rail name) and /sys/class/pwm/pwm-X.Y
I'm a little under the weather, so here's a few answers but not 100%... order matters, do the period before the duty cycle.. Look under /dev/pwm/ zmatt has put together a nice udev rule. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYh-D9_ZwWdgzn2Hcas5%3DzRwycRj%3D8xMWJE0mPO01%3DoUeQ%40mail.gmail.com.
