Skip to content

Commit 9dbabd6

Browse files
Terezventkartben
authored andcommitted
board: adafruit: Enable PWM on the Adafruit feather
This enables PWM on the Adafruit feather m4 express Signed-off-by: Teresa Zepeda Ventura <[email protected]>
1 parent 972c76b commit 9dbabd6

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

boards/adafruit/feather_m4_express/adafruit_feather_m4_express-pinctrl.dtsi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
pinmux = <PA22G_TCC0_WO2>;
3636
};
3737
};
38-
pwm1_default: pwm1_default {
38+
39+
tc0_default: tc0_default {
3940
group1 {
40-
pinmux = <PA18F_TCC1_WO2>,
41-
<PA19F_TCC1_WO3>;
41+
pinmux = <PA5E_TC0_WO1>;
4242
};
4343
};
4444

boards/adafruit/feather_m4_express/adafruit_feather_m4_express.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
aliases {
2626
led0 = &led0;
2727
pwm-0 = &tcc0;
28+
pwm-1 = &tc0;
2829
};
2930

3031
leds {
@@ -70,6 +71,17 @@
7071
pinctrl-names = "default";
7172
};
7273

74+
&tc0 {
75+
status = "okay";
76+
compatible = "atmel,sam0-tc-pwm";
77+
prescaler = <1024>;
78+
#pwm-cells = <2>;
79+
channels = <2>;
80+
counter-size = <16>;
81+
pinctrl-0 = <&tc0_default>;
82+
pinctrl-names = "default";
83+
};
84+
7385
zephyr_udc0: &usb0 {
7486
status = "okay";
7587
pinctrl-0 = <&usb_dc_default>;

boards/adafruit/feather_m4_express/support/openocd.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source [find target/atsame5x.cfg]
77

88
# TODO(http://openocd.zylin.com/#/c/5706/): lower the clock speed to workaround
99
# an erase timeout.
10-
adapter_khz 500
10+
adapter speed 500
1111
reset_config srst_only
1212

1313
$_TARGETNAME configure -event gdb-attach {

0 commit comments

Comments
 (0)