boards/shields/mcp2515/doc/index.html · boards/shields/mcp2515/doc/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Shields · CAN · MCP2515

Microchip MCP2515 CAN Bus Shields

MCP2515 SPI CAN controller를 Arduino와 Raspberry Pi Pico form factor의 세 shield에서 사용합니다.

Official pathboards/shields/mcp2515/doc/index.html
Source fileboards/shields/mcp2515/doc/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

세 shield의 TJA1050/MCP2551/TJA1051 차이, 73개 connector row, microSD·Qwiic·전원 구성과 CAN counter build를 설명합니다.

Controller

MCP2515 · CAN 2.0B

Shields

DFRobot · Keyestudio · PiCowbell

Host bus

SPI · 10MHz

CAN rate

Up to 1Mb/s

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 8E3AB0E935A36DDDA85CF6169794F72CE7FBC65B5064231988496ADF40BE6372
.. _mcp2515_shield:

Microchip MCP2515 CAN bus shields
#################################

Zephyr supports a couple of different shields carrying the Microchip `MCP2515`_
Stand-Alone CAN Controller with SPI Interface.

DFRobot CAN BUS Shield V2.0
***************************

Overview
--------

The DFRobot CAN BUS shield supports the Microchip MCP2515 stand-alone CAN
controller and JTA1050 high speed CAN transceiver. The shield has an Arduino
Uno R3 compatible hardware interface.

.. figure:: ../../../../../../../boards/shields/mcp2515/doc/dfrobot_can_bus_v2_0.jpg
   :align: center
   :alt: DFRobot_CAN_BUS_V2_0_SHIELD

Hardware
--------

- MCP2515

        - Stand-Alone CAN 2.0B Controller
        - Up to 1Mb/s baud rate
        - Standard and extended data and remote frames
        - 3x Tx Buffers
        - 2x Rx Buffers
        - 6x 29-bit Filters
        - 2x 29-bit Masks
        - Interrupt output
        - One shot mode
        - High speed SPI interface (10 MHz)

- TJA1050

        - Fully compatible with the “ISO 11898” standard
        - High speed (up to 1 Mbaud)

- Connectivity

        - Industrial standard DB9 terminal (CAN)
        - Screw terminals (CAN)
        - Integrated MicroSD socket for data storage (SPI)
        - Arduino Uno R3 compatible (SPI)

+-------+-----------------------+---------------------------+
| Name  | Function              | Usage                     |
+=======+=======================+===========================+
| A0    | None                  |                           |
+-------+-----------------------+---------------------------+
| A1    | None                  |                           |
+-------+-----------------------+---------------------------+
| A2    | None                  |                           |
+-------+-----------------------+---------------------------+
| A3    | None                  |                           |
+-------+-----------------------+---------------------------+
| A4    | None                  |                           |
+-------+-----------------------+---------------------------+
| A5    | None                  |                           |
+-------+-----------------------+---------------------------+
| D0    | RX                    | Ext. header only          |
+-------+-----------------------+---------------------------+
| D1    | TX                    | Ext. header only          |
+-------+-----------------------+---------------------------+
| D2    | GPIO_ACTIVE_LOW       | MCP2515 - INT             |
+-------+-----------------------+---------------------------+
| D3    | None                  |                           |
+-------+-----------------------+---------------------------+
| D4    | SPI-CS                | MicroSD                   |
+-------+-----------------------+---------------------------+
| D5    | None                  |                           |
+-------+-----------------------+---------------------------+
| D6    | None                  |                           |
+-------+-----------------------+---------------------------+
| D7    | None                  |                           |
+-------+-----------------------+---------------------------+
| D8    | None                  |                           |
+-------+-----------------------+---------------------------+
| D9    | None                  |                           |
+-------+-----------------------+---------------------------+
| D10   | SPI-CS                | MCP2515                   |
+-------+-----------------------+---------------------------+
| D11   | SPI-MOSI              | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D12   | SPI-MISO              | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D13   | SPI-CLK               | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D14   | I2C-SDA               | Ext. header only          |
+-------+-----------------------+---------------------------+
| D15   | I2C_SCL               | Ext. header only          |
+-------+-----------------------+---------------------------+


- Power Supply

        - 3.3V ~ 5V

- Components

        - Power switch
        - Power LED
        - RX0BF LED
        - RX1BF LED

For more information about the DFRobot CAN-BUS V2.0 shield:

- `DFRobot Website`_
- `DFRobot CAN BUS Shield V2.0 schematic`_
- `MCP2515 Datasheet`_
- `TJA1050 Datasheet`_

Keyestudio CAN-BUS Shield (KS0411)
**********************************

Overview
--------

The Keyestudio CAN BUS shield supports the Microchip MCP2515 stand-alone CAN
controller and MCP2551 high speed CAN transceiver. The shield has an Arduino
Uno R3 compatible hardware interface.

.. figure:: ../../../../../../../boards/shields/mcp2515/doc/keyestudio_can_bus_ks0411.jpg
   :align: center
   :alt: Keyestudio CAN-BUS Shield (KS0411)

   Keyestudio CAN-BUS Shield (KS0411) (Credit: Keyestudio)

Hardware
--------

- MCP2515

        - Stand-Alone CAN 2.0B Controller
        - Up to 1Mb/s baud rate
        - Standard and extended data and remote frames
        - 3x Tx Buffers
        - 2x Rx Buffers
        - 6x 29-bit Filters
        - 2x 29-bit Masks
        - Interrupt output
        - One shot mode
        - High speed SPI interface (10 MHz)

- MCP2551

        - Fully compatible with the “ISO 11898” standard
        - High speed (up to 1 Mbaud)

- Connectivity

        - Industrial standard DB9 terminal (CAN)
        - Pin headers (CAN)
        - Integrated MicroSD socket for data storage (SPI)
        - Arduino Uno R3 compatible (SPI)

+-------+-----------------------+---------------------------+
| Name  | Function              | Usage                     |
+=======+=======================+===========================+
| A0    | None                  |                           |
+-------+-----------------------+---------------------------+
| A1    | None                  |                           |
+-------+-----------------------+---------------------------+
| A2    | None                  |                           |
+-------+-----------------------+---------------------------+
| A3    | None                  |                           |
+-------+-----------------------+---------------------------+
| A4    | None                  |                           |
+-------+-----------------------+---------------------------+
| A5    | None                  |                           |
+-------+-----------------------+---------------------------+
| D0    | RX                    | Ext. header only          |
+-------+-----------------------+---------------------------+
| D1    | TX                    | Ext. header only          |
+-------+-----------------------+---------------------------+
| D2    | None                  |                           |
+-------+-----------------------+---------------------------+
| D3    | None                  |                           |
+-------+-----------------------+---------------------------+
| D4    | None                  |                           |
+-------+-----------------------+---------------------------+
| D5    | None                  |                           |
+-------+-----------------------+---------------------------+
| D6    | None                  |                           |
+-------+-----------------------+---------------------------+
| D7    | None                  |                           |
+-------+-----------------------+---------------------------+
| D8    | GPIO_ACTIVE_LOW       | MCP2515 - INT             |
+-------+-----------------------+---------------------------+
| D9    | SPI-CS                | MicroSD                   |
+-------+-----------------------+---------------------------+
| D10   | SPI-CS                | MCP2515                   |
+-------+-----------------------+---------------------------+
| D11   | SPI-MOSI              | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D12   | SPI-MISO              | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D13   | SPI-CLK               | MCP2515 / MicroSD         |
+-------+-----------------------+---------------------------+
| D14   | I2C-SDA               | Ext. header only          |
+-------+-----------------------+---------------------------+
| D15   | I2C_SCL               | Ext. header only          |
+-------+-----------------------+---------------------------+


- Power Supply

        - 5.0VDC

For more information about the Keyestudio CAN-BUS shield:

- `Keyestudio Website`_
- `Keyestudio Wiki`_
- `MCP2515 Datasheet`_
- `MCP2551 Datasheet`_

Adafruit PiCowbell CAN Bus Shield for Pico
******************************************

Overview
--------

The Adafruit PiCowbell CAN Bus Shield uses the Microchip MCP2515 controller
with an TJA1051/3 transceiver. This shield is built for the Raspberry Pi Pico
and uses the SPI interface. It also contains a Qwiic connector to add support
for a sensor.

.. figure:: ../../../../../../../boards/shields/mcp2515/doc/adafruit_can_picowbell.jpg
   :align: center
   :alt: Adafruit PiCowbell CAN Bus Shield

   Adafruit PiCowbell CAN Bus Shield

Hardware
--------

- MCP2515

        - Stand-Alone CAN 2.0B Controller
        - Up to 1Mb/s baud rate
        - Standard and extended data and remote frames
        - 3x Tx Buffers
        - 2x Rx Buffers
        - 6x 29-bit Filters
        - 2x 29-bit Masks
        - Interrupt output
        - One shot mode
        - High speed SPI interface (10 MHz)

- TJA1051

        - Fully compatible with the “ISO 11898-2:2016”, "SAE J2284-1" & "SAE J2284-5"  standards
        - Supports CAN FD
        - Fast data rates (up to 5 Mbit/s)

- Connectivity

        - Terminal Block - 3-pin 3.5mm (CAN)
        - Raspberry Pi Pico compatible (SPI)

+-------+-----------------------+---------------------------+
| Name  | Function              | Usage                     |
+=======+=======================+===========================+
| GP0   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP1   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP2   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP3   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP4   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP5   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP6   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP7   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP8   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP9   | None                  |                           |
+-------+-----------------------+---------------------------+
| GP10  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP11  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP12  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP13  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP14  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP15  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP16  | SPI-MISO              | MCP2515                   |
+-------+-----------------------+---------------------------+
| GP17  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP18  | SPI-SCK               | MCP2515                   |
+-------+-----------------------+---------------------------+
| GP19  | SPI-MOSI              | MCP2515                   |
+-------+-----------------------+---------------------------+
| GP20  | SPI-CS                | MCP2515                   |
+-------+-----------------------+---------------------------+
| GP21  | GPIO_ACTIVE_LOW       | MCP2515 - INT             |
+-------+-----------------------+---------------------------+
| GP22  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP23  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP24  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP25  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP26  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP27  | None                  |                           |
+-------+-----------------------+---------------------------+
| GP28  | None                  |                           |
+-------+-----------------------+---------------------------+


- Power Supply

        - 3.3V ~ 5V

For more information about the Adafruit PiCowbell CAN Bus shield:

- `Adafruit Website`_
- `MCP2515 Datasheet`_
- `TJA1051 Datasheet`_

Programming
***********

Set ``--shield dfrobot_can_bus_v2_0`` or ``--shield keyestudio_can_bus_ks0411``
or ``--shield adafruit_can_picowbell`` when you invoke ``west build`` or ``cmake`` in your Zephyr application. For
example:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/can/counter
   :tool: all
   :board: nrf52dk/nrf52832
   :shield: dfrobot_can_bus_v2_0
   :goals: build flash

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/can/counter
   :tool: all
   :board: nrf52840dk/nrf52840
   :shield: keyestudio_can_bus_ks0411
   :goals: build flash

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/can/counter
   :tool: all
   :board: rpi_pico
   :shield: adafruit_can_picowbell
   :goals: build

.. _DFRobot Website:
   https://www.dfrobot.com/product-1444.html

.. _DFRobot CAN BUS Shield V2.0 schematic:
   https://github.com/DFRobot/DFRobot_MCP2515/blob/master/resources/doc/DFR0370%20CAN%20BUS%20sheild(V2.0).pdf

.. _MCP2515:
   https://www.microchip.com/en-us/product/MCP2515

.. _Keyestudio Website:
   https://www.keyestudio.com/2019new-keyestudio-can-bus-shield-mcp2551-chip-with-sd-socket-for-arduino-uno-r3-p0543.html

.. _Keyestudio Wiki:
   https://wiki.keyestudio.com/KS0411_keyestudio_CAN-BUS_Shield

.. _MCP2515 Datasheet:
   http://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf

.. _TJA1050 Datasheet:
   https://www.nxp.com/docs/en/data-sheet/TJA1050.pdf

.. _MCP2551 Datasheet:
   https://ww1.microchip.com/downloads/en/DeviceDoc/20001667G.pdf

.. _Adafruit Website:
   https://www.adafruit.com/product/5728#technical-details

.. _TJA1051 Datasheet:
   https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf

Part 3

한국어 전문 번역

개요

Zephyr는 SPI interface를 갖춘 Microchip MCP2515 stand-alone CAN controller를 탑재한 여러 shield를 지원합니다.

DFRobot CAN BUS Shield V2.0

DFRobot shield는 MCP2515 stand-alone CAN controller와 high-speed CAN transceiver를 탑재하며 Arduino Uno R3 hardware interface를 사용합니다.

DFRobot CAN BUS Shield V2.0
DFRobot CAN BUS Shield V2.0

MCP2515

  • Stand-alone CAN 2.0B controller
  • 최대 1Mb/s baud rate
  • Standard/extended data frame와 remote frame
  • Tx buffer 3개, Rx buffer 2개
  • 29-bit filter 6개, 29-bit mask 2개
  • Interrupt output과 one-shot mode
  • 10MHz high-speed SPI interface

TJA1050

  • ISO 11898 standard와 완전 호환
  • 최대 1Mbaud high-speed CAN

Connectivity

  • Industrial-standard DB9 terminal과 screw terminal(CAN)
  • Data storage용 integrated microSD socket(SPI)
  • Arduino Uno R3 compatible SPI
NameFunctionUsage
A0None
A1None
A2None
A3None
A4None
A5None
D0RXExt. header only
D1TXExt. header only
D2GPIO_ACTIVE_LOWMCP2515 - INT
D3None
D4SPI-CSMicroSD
D5None
D6None
D7None
D8None
D9None
D10SPI-CSMCP2515
D11SPI-MOSIMCP2515 / MicroSD
D12SPI-MISOMCP2515 / MicroSD
D13SPI-CLKMCP2515 / MicroSD
D14I2C-SDAExt. header only
D15I2C_SCLExt. header only

Power와 component

  • Power supply: 3.3V~5V
  • Power switch와 power LED
  • RX0BF LED, RX1BF LED

Keyestudio CAN-BUS Shield (KS0411)

Keyestudio shield는 MCP2515 stand-alone CAN controller와 MCP2551 high-speed CAN transceiver를 탑재하며 Arduino Uno R3 hardware interface를 사용합니다.

Keyestudio CAN-BUS Shield KS0411
Keyestudio CAN-BUS Shield (KS0411)

MCP2515

  • Stand-alone CAN 2.0B controller
  • 최대 1Mb/s baud rate
  • Standard/extended data frame와 remote frame
  • Tx buffer 3개, Rx buffer 2개
  • 29-bit filter 6개, 29-bit mask 2개
  • Interrupt output과 one-shot mode
  • 10MHz high-speed SPI interface

MCP2551

  • ISO 11898 standard와 완전 호환
  • 최대 1Mbaud high-speed CAN

Connectivity

  • Industrial-standard DB9 terminal과 CAN pin header
  • Data storage용 integrated microSD socket(SPI)
  • Arduino Uno R3 compatible SPI
NameFunctionUsage
A0None
A1None
A2None
A3None
A4None
A5None
D0RXExt. header only
D1TXExt. header only
D2None
D3None
D4None
D5None
D6None
D7None
D8GPIO_ACTIVE_LOWMCP2515 - INT
D9SPI-CSMicroSD
D10SPI-CSMCP2515
D11SPI-MOSIMCP2515 / MicroSD
D12SPI-MISOMCP2515 / MicroSD
D13SPI-CLKMCP2515 / MicroSD
D14I2C-SDAExt. header only
D15I2C_SCLExt. header only

Power supply는 5.0VDC입니다.

Adafruit PiCowbell CAN Bus Shield for Pico

Adafruit PiCowbell은 MCP2515 controller와 TJA1051/3 transceiver를 사용합니다. Raspberry Pi Pico용 SPI shield이며 sensor 확장을 위한 Qwiic connector도 포함합니다.

Adafruit PiCowbell CAN Bus Shield
Adafruit PiCowbell CAN Bus Shield

MCP2515

  • Stand-alone CAN 2.0B controller
  • 최대 1Mb/s baud rate
  • Standard/extended data frame와 remote frame
  • Tx buffer 3개, Rx buffer 2개
  • 29-bit filter 6개, 29-bit mask 2개
  • Interrupt output과 one-shot mode
  • 10MHz high-speed SPI interface

TJA1051

  • ISO 11898-2:2016, SAE J2284-1, SAE J2284-5 standard와 완전 호환
  • CAN FD 지원
  • 최대 5Mbit/s fast data rate

Connectivity

  • 3-pin 3.5mm terminal block(CAN)
  • Raspberry Pi Pico compatible SPI
NameFunctionUsage
GP0None
GP1None
GP2None
GP3None
GP4None
GP5None
GP6None
GP7None
GP8None
GP9None
GP10None
GP11None
GP12None
GP13None
GP14None
GP15None
GP16SPI-MISOMCP2515
GP17None
GP18SPI-SCKMCP2515
GP19SPI-MOSIMCP2515
GP20SPI-CSMCP2515
GP21GPIO_ACTIVE_LOWMCP2515 - INT
GP22None
GP23None
GP24None
GP25None
GP26None
GP27None
GP28None

Power supply는 3.3V~5V입니다.

프로그래밍

Zephyr application에서 shield에 맞춰 dfrobot_can_bus_v2_0, keyestudio_can_bus_ks0411, adafruit_can_picowbell 중 하나를 선택합니다.

DFRobot

west build -b nrf52dk/nrf52832   --shield dfrobot_can_bus_v2_0   samples/drivers/can/counter
west flash

Keyestudio

west build -b nrf52840dk/nrf52840   --shield keyestudio_can_bus_ks0411   samples/drivers/can/counter
west flash

Adafruit PiCowbell

west build -b rpi_pico   --shield adafruit_can_picowbell   samples/drivers/can/counter

참고 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.