Skip to content

Commit ffa676d

Browse files
Raffael Rostagnokartben
authored andcommitted
tests: pwm_loopback: esp32c6: Add test config
Add test config file to test MCPWM loopback on ESP32C6 Signed-off-by: Raffael Rostagno <[email protected]>
1 parent 0cb755a commit ffa676d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pwm/pwm.h>
8+
9+
/ {
10+
pwm_loopback_0 {
11+
compatible = "test-pwm-loopback";
12+
/* first index must be a 32-Bit timer */
13+
pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>,
14+
<&mcpwm0 6 0 PWM_POLARITY_NORMAL>;
15+
};
16+
};
17+
18+
&pinctrl {
19+
mcpwm0_default: mcpwm0_default {
20+
group1 {
21+
pinmux = <MCPWM0_OUT0A_GPIO2>;
22+
input-enable;
23+
};
24+
group2 {
25+
pinmux = <MCPWM0_CAP0_GPIO2>;
26+
output-enable;
27+
};
28+
};
29+
};
30+
31+
&mcpwm0 {
32+
pinctrl-0 = <&mcpwm0_default>;
33+
pinctrl-names = "default";
34+
prescale = <255>;
35+
prescale-timer0 = <103>;
36+
status = "okay";
37+
};

0 commit comments

Comments
 (0)