Skip to content

Commit 3b5d7a4

Browse files
ghostMan-pachenrikbrixandersen
authored andcommitted
tests: pwm: sam0: Added overlay file for pwm starting
- Added the overlay files for testing the same54_xpro boards for the pwm_gpio_loopback test. Signed-off-by: Muhammed Asif <[email protected]>
1 parent 67a25f2 commit 3b5d7a4

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_GPIO=y
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2025 Muhammed Asif
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Test requires jumper between:
6+
* - PA04 -- PA05
7+
*/
8+
9+
/ {
10+
zephyr,user {
11+
pwms = <&tc0 1 PWM_MSEC(2)>;
12+
gpios = <&porta 4 GPIO_ACTIVE_HIGH>;
13+
};
14+
};
15+
16+
&tc0 {
17+
status = "okay";
18+
compatible = "atmel,sam0-tc-pwm";
19+
/* Gives a maximum period of 1.1s for 120MHz main clock */
20+
prescaler = <4>;
21+
#pwm-cells = <2>;
22+
23+
pinctrl-0 = <&tc0_default>;
24+
pinctrl-names = "default";
25+
26+
channels = <2>;
27+
counter-size = <32>;
28+
};
29+
30+
&pinctrl {
31+
tc0_default: tc0_default {
32+
group1 {
33+
pinmux = <PA5E_TC0_WO1>;
34+
};
35+
};
36+
};

0 commit comments

Comments
 (0)