Skip to content

Commit 468a180

Browse files
ThreeEightskartben
authored andcommitted
boards: shields: Add support for Canis Labs CANPico Shield
Add support for shields based on the Microchip MCP251xFD CAN Bus controllers, along with the Canis Automotive Labs CANPico shield for the Raspberry Pi Pico. Updated to focus on only the CANPico shield. Use alternate image for shield. Corrected image file extension. Signed-off-by: Steve Boylan <[email protected]>
1 parent f0a8777 commit 468a180

File tree

5 files changed

+220
-0
lines changed

5 files changed

+220
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Steve Boylan
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_CANIS_CANPICO
5+
def_bool $(shields_list_contains,canis_canpico)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (c) 2025 Steve Boylan
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pico_spi {
8+
status = "okay";
9+
cs-gpios = <&pico_header 6 GPIO_ACTIVE_LOW>;
10+
pinctrl-0 = <&spi1_canpico>;
11+
pinctrl-names = "default";
12+
13+
mcp251xfd_canis_canpico: can@0 {
14+
compatible = "microchip,mcp251xfd";
15+
spi-max-frequency = <1000000>;
16+
int-gpios = <&pico_header 5 GPIO_ACTIVE_LOW>;
17+
status = "okay";
18+
reg = <0x0>;
19+
osc-freq = <16000000>;
20+
21+
can-transceiver {
22+
max-bitrate = <1000000>;
23+
};
24+
};
25+
};
26+
27+
&pinctrl {
28+
spi1_canpico: spi1_canpico {
29+
group1 {
30+
pinmux = <SPI1_SCK_P10>, <SPI1_TX_P11>;
31+
};
32+
33+
group2 {
34+
pinmux = <SPI1_RX_P8>;
35+
input-enable;
36+
};
37+
};
38+
};
39+
40+
/ {
41+
chosen {
42+
zephyr,canbus = &mcp251xfd_canis_canpico;
43+
};
44+
};
31.4 KB
Loading
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
.. _canis_canpico:
2+
3+
Canis Labs CANPico Shield
4+
#########################
5+
6+
Overview
7+
********
8+
9+
The Canis Labs CANPico shield supports the Microchip MCP2517FD or MCP2518FD
10+
stand-alone CAN controller and Microchip MCP2562FD high-speed CAN FD
11+
transceiver. The CANPico is a carrier board in a ‘sock’ format for a
12+
Raspberry Pi Pico family.
13+
14+
.. figure:: canis_canpico.webp
15+
:align: center
16+
:alt: Canis_Labs_CANPico_SHIELD
17+
18+
Hardware
19+
********
20+
21+
- MCP2517/2518FD
22+
23+
- External CAN FD Controller with Serial Peripheral Interface (SPI)
24+
- Arbitration Bit Rate up to 1 Mbps
25+
- Data Bit Rate up to 8 Mbps
26+
- CAN FD Controller modes: CAN 2.0B Mode or Mixed CAN 2.0B and CAN FD Mode
27+
- Conforms to ISO 11898-1:2015
28+
29+
- MCP2562FD
30+
31+
- Optimized for CAN FD (Flexible Data rate) at 2, 5 and 8 Mbps Operation
32+
- Maximum Propagation Delay: 120 ns
33+
- Implements ISO-11898-2 and ISO-11898-5 Standard Physical Layer Requirements
34+
- Very Low Standby Current (5 µA, typical)
35+
- VIO Supply Pin to Interface Directly to CAN Controllers and Microcontrollers with 1.8V to 5.5V I/O
36+
37+
- Connectivity
38+
39+
- Jumper header to enable a 120W CAN bus termination resistor
40+
- Jumper header to enable the CAN TX line to the transceiver
41+
- Screw terminal connector to CAN bus
42+
- CAN controller interrupt and Start-of-Frame inputs to GPIO pins
43+
- Direct access via GPIO pins to the CAN transceiver Tx and Rx pins
44+
- Test instrument header (for an oscilloscope or logic analyzer)
45+
46+
+-------+-----------------------+---------------------------+
47+
| Name | Function | Usage |
48+
+=======+=======================+===========================+
49+
| GP0 | None | |
50+
+-------+-----------------------+---------------------------+
51+
| GP1 | None | |
52+
+-------+-----------------------+---------------------------+
53+
| GP2 | TRIG | Programmable trigger |
54+
+-------+-----------------------+---------------------------+
55+
| GP3 | STBY | Transceiver standby |
56+
+-------+-----------------------+---------------------------+
57+
| GP4 | SOF | Clock/SOF |
58+
+-------+-----------------------+---------------------------+
59+
| GP5 | IRQ | Transceiver interrupt |
60+
+-------+-----------------------+---------------------------+
61+
| GP6 | None | SPI CS |
62+
+-------+-----------------------+---------------------------+
63+
| GP7 | None | |
64+
+-------+-----------------------+---------------------------+
65+
| GP8 | SPI1_Rx | SPI Rx |
66+
+-------+-----------------------+---------------------------+
67+
| GP9 | None | |
68+
+-------+-----------------------+---------------------------+
69+
| GP10 | SPI1_SCK | SPI clock |
70+
+-------+-----------------------+---------------------------+
71+
| GP11 | SPI1_Tx | SPI Tx |
72+
+-------+-----------------------+---------------------------+
73+
| GP12 | None | |
74+
+-------+-----------------------+---------------------------+
75+
| GP13 | None | |
76+
+-------+-----------------------+---------------------------+
77+
| GP14 | None | |
78+
+-------+-----------------------+---------------------------+
79+
| GP15 | None | |
80+
+-------+-----------------------+---------------------------+
81+
| GP16 | None | |
82+
+-------+-----------------------+---------------------------+
83+
| GP17 | None | |
84+
+-------+-----------------------+---------------------------+
85+
| GP18 | None | |
86+
+-------+-----------------------+---------------------------+
87+
| GP19 | None | |
88+
+-------+-----------------------+---------------------------+
89+
| GP20 | None | |
90+
+-------+-----------------------+---------------------------+
91+
| GP21 | Rx | CAN Rx data |
92+
+-------+-----------------------+---------------------------+
93+
| GP22 | Tx | CAN Tx data |
94+
+-------+-----------------------+---------------------------+
95+
| GP23 | None | |
96+
+-------+-----------------------+---------------------------+
97+
| GP24 | None | |
98+
+-------+-----------------------+---------------------------+
99+
| GP25 | None | |
100+
+-------+-----------------------+---------------------------+
101+
| GP26 | None | |
102+
+-------+-----------------------+---------------------------+
103+
| GP27 | None | |
104+
+-------+-----------------------+---------------------------+
105+
| GP28 | None | |
106+
+-------+-----------------------+---------------------------+
107+
108+
- Test header
109+
110+
- TRIG: Programmable trigger output
111+
- Tx: Logic-level CAN Tx data
112+
- Rx: Logic-level CAN Rx data
113+
- H: Raw CAN-Hi signal
114+
- L: Raw CAN-Low signal
115+
116+
- Power Supply
117+
118+
- 3.3V ~ 5V
119+
120+
- Components
121+
122+
- Tx Enable jumper
123+
- 120 ohm terminator jumper
124+
125+
For more information about the Canis Labs CANPico shield:
126+
127+
- `Canis Labs Website`_
128+
- `CANPico CAN Bus Shield`_
129+
- `MCP2517FD Datasheet`_
130+
- `MCP2518FD Datasheet`_
131+
- `MCP2562FD Datasheet`_
132+
133+
Programming
134+
***********
135+
136+
Set ``--shield canis-canpico`` when you invoke ``west build`` or ``cmake``
137+
in your Zephyr application. For example:
138+
139+
.. zephyr-app-commands::
140+
:zephyr-app: samples/drivers/can/counter
141+
:tool: all
142+
:board: rpi_pico
143+
:shield: canpico
144+
:goals: build flash
145+
146+
.. _Canis Labs Website:
147+
https://canislabs.com/
148+
149+
.. _CANPico CAN Bus Shield:
150+
https://canislabs.com/canpico/
151+
152+
.. _MCP2517FD:
153+
https://www.microchip.com/en-us/product/MCP2518FD
154+
155+
.. _MCP2517FD Datasheet:
156+
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/MCP2517FD-External-CAN-FD-Controller-with-SPI-Interface-20005688B.pdf
157+
158+
.. _MCP2518FD:
159+
https://www.microchip.com/en-us/product/MCP2518FD
160+
161+
.. _MCP2518FD Datasheet:
162+
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/External-CAN-FD-Controller-with-SPI-Interface-DS20006027B.pdf
163+
164+
.. _MCP2562FD Datasheet:
165+
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/20005284A.pdf
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
shields:
2+
- name: canis_canpico
3+
full_name: Canis Labs CANPico
4+
vendor: canis
5+
supported_features:
6+
- can

0 commit comments

Comments
 (0)