> > > > > > *root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > cat > polaritynormalroot@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 1 > polaritybash: echo: write error: Invalid argument*
The error here is self explanatory, and obvious. Look at the difference between your cat of polarity, and then what you attempt to echo into polarity. I'll give you a hint. polarity is not expecting a numerical value. On Sat, Jun 4, 2016 at 4:21 AM, vik <[email protected]> wrote: > > Hi , > > I am unable to reverse polarity to PWM port P8_19. > > My Linux version Linux arm 4.4.6-ti-r15 #1 SMP Tue Apr 5 08:05:26 UTC 2016 > armv7l GNU/Linux > > I get Invalid argument error. > > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 1000000 > period > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 500000 > duty_cycle > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 1 > enable > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 0 > enable > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > cat polarity > normal > root@arm:/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > echo 1 > polarity > bash: echo: write error: Invalid argument > root@arm > :/sys/devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip0/pwm1# > > > I am using the ehrpwm2A PWM on P8_19. The following device tree overlay > (BB-PWM2-00A0.dts): > > /dts-v1/; > > /plugin/; > > > /{ > > compatible = "ti,beaglebone", "ti,beaglebone-black"; > > part-number = "BB-PWM2"; > > version = "00A0"; > > > fragment@0 { > > target = <&am33xx_pinmux>; > > __overlay__ { > > pinctrl_spec: Panel_Pins { > > pinctrl-single,pins = < > > 0x020 0x04 /* P8_19 MODE4 ehrpwm2A PWM */ > > >; > > }; > > }; > > }; > > > fragment@1 { > > target = <&ocp>; > > __overlay__ { > > test_helper: helper { > > compatible = "bone-pinmux-helper"; > > pinctrl-names = "default"; > > pinctrl-0 = <&pinctrl_spec>; > > status = "okay"; > > }; > > }; > > }; > > > fragment@2 { > > target = <&epwmss2>; > > __overlay__ { > > status = "okay"; > > }; > > }; > > > fragment@3 { > > target = <&ehrpwm2>; > > __overlay__ { > > status = "okay"; > > }; > > }; > > > }; > > > > -- > 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/a0c929be-560b-4f2e-8e3d-ed45d083adc6%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/a0c929be-560b-4f2e-8e3d-ed45d083adc6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CALHSORoTyY4y0WJptimp6vEoAGQ7wx_C9VeuvUBAMM2zgEBbtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
