Skip to content

Commit bf52bfe

Browse files
karstenkoenignashif
authored andcommitted
samples: can: Added project configuration for MCP2515
Project configuration to run the CAN sample with the MCP2515 attached via SPI as the CAN controller. Signed-off-by: Karsten Koenig <[email protected]>
1 parent 4f77610 commit bf52bfe

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2019 Karsten Koenig
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&spi1 {
8+
status = "ok";
9+
mcp2515@0 {
10+
compatible = "microchip,mcp2515";
11+
spi-port-name = "SPI_1";
12+
spi-max-frequency = <1000000>;
13+
int-gpios = <&gpiob 4 GPIO_INT_ACTIVE_LOW>;
14+
status = "ok";
15+
label = "CAN_1";
16+
reg = <0>;
17+
};
18+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CAN + MCP2515 config
2+
CONFIG_SPI=y
3+
CONFIG_CAN=y
4+
CONFIG_CAN_INIT_PRIORITY=80
5+
CONFIG_CAN_1=y
6+
CONFIG_CAN_MCP2515=y

0 commit comments

Comments
 (0)