Skip to content

Commit 039afb3

Browse files
samples: boards: renesas: elc: Add support sample elc for ek_ra4c1
Add support sample app ``renesas/elc`` for Renesas ek_ra4c1 board Signed-off-by: Khoa Nguyen <[email protected]>
1 parent 40972ea commit 039afb3

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pwm/pwm.h>
8+
#include <zephyr/dt-bindings/pwm/ra_pwm.h>
9+
10+
/ {
11+
aliases {
12+
pwm-gen = &pwm0;
13+
pwm-cap = &pwm4;
14+
elc-link = &elc;
15+
};
16+
};
17+
18+
&pinctrl {
19+
pwm0_default: pwm0_default {
20+
group1 {
21+
/* GTIOC0A*/
22+
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 15)>;
23+
};
24+
};
25+
};
26+
27+
&pwm0 {
28+
pinctrl-0 = <&pwm0_default>;
29+
pinctrl-names = "default";
30+
interrupts = <62 1>, <63 1>;
31+
interrupt-names = "gtioca", "overflow";
32+
status = "okay";
33+
};
34+
35+
&pwm0 {
36+
renesas-elcs = <&elc RA_ELC_PERIPHERAL_GPT_A RA_ELC_EVENT_ELC_SOFTWARE_EVENT_0>,
37+
<&elc RA_ELC_PERIPHERAL_GPT_B RA_ELC_EVENT_ELC_SOFTWARE_EVENT_1>;
38+
renesas-elc-names = "start", "stop";
39+
start-source = "GPT_SOURCE_GPT_A";
40+
stop-source = "GPT_SOURCE_GPT_B";
41+
status = "okay";
42+
};
43+
44+
&elc {
45+
status = "okay";
46+
};

0 commit comments

Comments
 (0)