Skip to content

Commit abe18d2

Browse files
Raffael Rostagnokartben
authored andcommitted
boards: esp32c6_devkitc: Add CAN sample
Add CAN sample for esp32c6_devkitc. Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
1 parent 8167fe3 commit abe18d2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* Enable CAN bus */
8+
&twai0 {
9+
status = "okay";
10+
pinctrl-0 = <&twai_default>;
11+
pinctrl-names = "default";
12+
13+
can-transceiver {
14+
max-bitrate = <1000000>;
15+
};
16+
};
17+
18+
&pinctrl {
19+
twai_default: twai_default {
20+
group1 {
21+
pinmux = <TWAI0_RX_GPIO5>;
22+
output-enable; /* enable internal loopback */
23+
};
24+
group2 {
25+
pinmux = <TWAI0_TX_GPIO5>;
26+
input-enable; /* enable internal loopback */
27+
};
28+
};
29+
};

0 commit comments

Comments
 (0)