I know you've solved it or moved on but "inversed" is the secret word
you're looking for. Took a bunch of digging through source & guessing to
find it, maybe I can save somebody else the headache if they happen to find
this thread.
On Saturday, June 4, 2016 at 3:14:10 PM UTC-4, Vik 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/57f77b50-040f-4bda-9312-f8668b77997e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.