using PWM with BBB Rev C, Debian, kernel 8.13-bone70

I’ve been looking around for quite a number of days now and while there is quite a lot of information on the subject, most of it appears to be outdated and/or insufficient for my system. I have a BBB Rev C running the default Debian (uname -r returns “kernel 8.13-bone70”). I have tried a few guides step by step to no avail (https://briancode.wordpress.com/2015/01/06/working-with-pwm-on-a-beaglebone-black/, http://hipstercircuits.com/enable-pwm-on-beaglebone-with-device-tree-overlays/)

Basing my attempts off of these and Derek Molloy’s tutorial on GPIO with Device Tree Overlays (which work just fine), this is my .dts file

/* Simple PWM overlay */

/dts-v1/;
/plugin/;

/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;

/* identification */
part-number = “SJP-PWM”;
version = “00A0”;

/* state the resources this cape uses */
exclusive-use =
“P9.21”,
“P9.22”,

“ehrpwm0A”,
“ehrpwm0B”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
bb_ehrpwm0_pins: pinmux_bb_ehrpwm0_pins {
pinctrl-single,pins = <
0x154 0x03 /* P9_21 muxRegOffset, Mode3 (ehrpwm0B) /
0x150 0x03 /
P9_22 muxRegOffset, Mode3 (ehrpwm0A) */

;
};
};
};

//
/
Pin Multiplexing /
/
/

fragment@1 {
target = <&ocp>;
overlay {
P9_21_pinmux {
compatible = “bone-pinmux-helper”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_ehrpwm0_pins>;
status = “okay”;
};
};
};

//
/* Enable PWM Devices */
/
/

fragment@2 {
target = <&epwmss0>;
overlay {
status = “okay”;
};
};

fragment@3 {
target = <&ehrpwm0>;
overlay {
status = “okay”;
};
};
};

When I compile and load the overlay, the pwmchip0 directory appears in /sys/class/pwm much as I expected. I can also

sudo sh -c “echo 1 > /sys/class/pwm/export” to get the pwm1 directory (which should correspond to ehrpwm0a on pin P9_22, right?)

This is as far as I get however, as no combination of setting period_ns, duty_ns and run produces any output. What am I missing?

Thanks,
Stefan

There ^ fixed it..

Regards,