File tree 6 files changed +52
-0
lines changed
6 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ .cache /
2
+ build /
3
+ .vscode /
4
+ .clangd
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.13.1)
2
+ set (BOARD blackpill_f401cc)
3
+ set (DTC_OVERLAY_FILE "boards/app.overlay" )
4
+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
5
+
6
+ project (CANscribe LANGUAGES C)
7
+
8
+ target_sources (app PRIVATE src/main.c)
Original file line number Diff line number Diff line change
1
+ mainmenu "Controller Area Network sample application"
2
+
3
+ config LOOPBACK_MODE
4
+ bool "Loopback LOOPBACK_MODE"
5
+ default y
6
+ help
7
+ Set the controller to loopback mode.
8
+ This allows testing without a second board.
9
+
10
+ source "Kconfig.zephyr"
Original file line number Diff line number Diff line change
1
+ /{
2
+ chosen {
3
+ zephyr,canbus = &mcp2515_can_bus;
4
+ };
5
+ };
6
+
7
+ &spi1 {
8
+ status = "okay";
9
+ cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>;
10
+ mcp2515_can_bus: can@0 {
11
+ compatible = "microchip,mcp2515";
12
+ spi-max-frequency = <1000000>;
13
+ int-gpios = <&gpiob 9 GPIO_ACTIVE_LOW>; /* B9 */
14
+ status = "okay";
15
+ reg = <0x0>;
16
+ osc-freq = <8000000>;
17
+ bus-speed = <125000>;
18
+ sjw = <1>;
19
+ sample-point = <875>;
20
+
21
+ can-transceiver {
22
+ max-bitrate = <1000000>;
23
+ };
24
+ };
25
+ };
Original file line number Diff line number Diff line change
1
+ CONFIG_LOG=y
2
+
3
+ CONFIG_CAN=y
4
+ CONFIG_CAN_INIT_PRIORITY=80
5
+ CONFIG_CAN_MAX_FILTER=5
You can’t perform that action at this time.
0 commit comments