Skip to content

Commit 04ab99c

Browse files
nixwardcarlescufi
authored andcommitted
boards: shields: Add DFRobot CAN bus Shield V2.0
Useful for prototyping designs for the MCP2515 CAN controller Signed-off-by: Nick Ward <[email protected]>
1 parent e7ec1a5 commit 04ab99c

File tree

4 files changed

+167
-0
lines changed

4 files changed

+167
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_SPI=y
2+
CONFIG_CAN_1=y
3+
CONFIG_CAN_MCP2515=y
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2019 Karsten Koenig
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&arduino_spi {
8+
status = "okay";
9+
cs-gpios = <&arduino_header 16 0>; /* D10 */
10+
11+
mcp2515@0 {
12+
compatible = "microchip,mcp2515";
13+
spi-max-frequency = <1000000>;
14+
int-gpios = <&arduino_header 8 0>; /* D2 */
15+
status = "okay";
16+
label = "CAN_1";
17+
reg = <0x0>;
18+
osc-freq = <16000000>;
19+
bus-speed = <125000>;
20+
sjw = <1>;
21+
prop-seg = <2>;
22+
phase-seg1 = <7>;
23+
phase-seg2 = <6>;
24+
#address-cells = <1>;
25+
#size-cells = <0>;
26+
};
27+
};
213 KB
Loading
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
.. _dfrobot_can_bus_v2_0:
2+
3+
DFRobot CAN BUS Shield V2.0
4+
###########################
5+
6+
Overview
7+
********
8+
9+
The DFRobot CAN BUS shield supports the Microship MCP2515 stand-alone CAN
10+
controller and JTA1050 high speed CAN tranceiver.
11+
The shield has an Arduino Uno R3 compatible hardware interface.
12+
13+
14+
.. image:: ./dfrobot_can_bus_v2_0.jpg
15+
:width: 720px
16+
:align: center
17+
:alt: DFRobot_CAN_BUS_V2_0_SHIELD
18+
19+
Hardware
20+
********
21+
22+
- MCP2515
23+
24+
- Stand-Alone CAN 2.0B Controller
25+
- Up to 1Mb/s baud rate
26+
- Standard and extended data and remote frames
27+
- 3x Tx Buffers
28+
- 2x Rx Buffers
29+
- 6x 29-bit Filters
30+
- 2x 29-bit Masks
31+
- Interrupt output
32+
- One shot mode
33+
- High speed SPI interface (10 MHz)
34+
35+
- TJA1050
36+
37+
- Fully compatible with the “ISO 11898” standard
38+
- High speed (up to 1 Mbaud)
39+
40+
- Connectivity
41+
42+
- Industrial standard DB9 terminal (CAN)
43+
- Screw terminals (CAN)
44+
- Integrated MicroSD socket for data storage (SPI)
45+
- Arduino Uno R3 compatible (SPI)
46+
47+
+-------+-----------------------+---------------------------+
48+
| Name | Function | Usage |
49+
+=======+=======================+===========================+
50+
| A0 | None | |
51+
+-------+-----------------------+---------------------------+
52+
| A1 | None | |
53+
+-------+-----------------------+---------------------------+
54+
| A2 | None | |
55+
+-------+-----------------------+---------------------------+
56+
| A3 | None | |
57+
+-------+-----------------------+---------------------------+
58+
| A4 | None | |
59+
+-------+-----------------------+---------------------------+
60+
| A5 | None | |
61+
+-------+-----------------------+---------------------------+
62+
| D0 | RX | Ext. header only |
63+
+-------+-----------------------+---------------------------+
64+
| D1 | TX | Ext. header only |
65+
+-------+-----------------------+---------------------------+
66+
| D2 | GPIO_INT_ACTIVE_LOW | MCP2515 - INT |
67+
+-------+-----------------------+---------------------------+
68+
| D3 | None | |
69+
+-------+-----------------------+---------------------------+
70+
| D4 | SPI-CS | MicroSD |
71+
+-------+-----------------------+---------------------------+
72+
| D5 | None | |
73+
+-------+-----------------------+---------------------------+
74+
| D6 | None | |
75+
+-------+-----------------------+---------------------------+
76+
| D7 | None | |
77+
+-------+-----------------------+---------------------------+
78+
| D8 | None | |
79+
+-------+-----------------------+---------------------------+
80+
| D9 | None | |
81+
+-------+-----------------------+---------------------------+
82+
| D10 | SPI-CS | MCP2515 |
83+
+-------+-----------------------+---------------------------+
84+
| D11 | SPI-MOSI | MCP2515 / MicroSD |
85+
+-------+-----------------------+---------------------------+
86+
| D12 | SPI-MISO | MCP2515 / MicroSD |
87+
+-------+-----------------------+---------------------------+
88+
| D13 | SPI-CLK | MCP2515 / MicroSD |
89+
+-------+-----------------------+---------------------------+
90+
| D14 | I2C-SDA | Ext. header only |
91+
+-------+-----------------------+---------------------------+
92+
| D15 | I2C_SCL | Ext. header only |
93+
+-------+-----------------------+---------------------------+
94+
95+
96+
- Power Supply
97+
98+
- 3.3V ~ 5V
99+
100+
- Components
101+
102+
- Power switch
103+
- Power LED
104+
- RX0BF LED
105+
- RX1BF LED
106+
107+
For more information about the DFRobot CAN-BUS V2.0 shield:
108+
109+
- `DFRobot Website`_
110+
- `DFRobot CAN BUS Shield V2.0 schematic`_
111+
- `MCP2515 Datasheet`_
112+
- `TJA1050 Datasheet`_
113+
114+
Programming
115+
***********
116+
117+
Set ``-DSHIELD=dfrobot_can_bus_v2_0`` when you invoke ``west build`` or ``cmake`` in your
118+
Zephyr application. For example:
119+
120+
.. zephyr-app-commands::
121+
:zephyr-app: samples/drivers/CAN
122+
:tool: all
123+
:board: nrf52_pca10040
124+
:shield: dfrobot_can_bus_v2_0
125+
:goals: build
126+
127+
.. _DFRobot Website:
128+
https://www.dfrobot.com/product-1444.html
129+
130+
.. _DFRobot CAN BUS Shield V2.0 schematic:
131+
https://github.com/DFRobot/CAN_BUS/blob/master/DFR0370%20CAN%20BUS%20sheild(V2.0).pdf
132+
133+
.. _MCP2515 Datasheet:
134+
http://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf
135+
136+
.. _TJA1050 Datasheet:
137+
https://www.nxp.com/docs/en/data-sheet/TJA1050.pdf

0 commit comments

Comments
 (0)