Changes between Version 5 and Version 6 of canbus


Ignore:
Timestamp:
08/31/2018 12:51:15 AM (8 years ago)
Author:
Tim Harvey
Comment:

added additional newport driver details

Legend:

Unmodified
Added
Removed
Modified
  • canbus

    v5 v6  
    5151
    5252
     53[=#gateworks]
    5354== Gateworks Hardware
    5455The following Gateworks products have CAN:
    … …  
    6869
    6970
     71[=#stby]
    7072=== CAN Transceiver STBY
    7173For boards that have a CAN STBY signal connected to a GPIO, the signal must be driven high to enable CAN:
    … …  
    8486
    8587
     88[=#software]
    8689== Software
    8790CAN bus is supported on the various BSP's supported by Gateworks.
    8891
    89 Kernel Drivers:
    90  * flexcan (Ventana / IMX6)
    91  * mcp251x / spi-cavium / spi-cavium-thunderx (Newport / CN80XX)
    92 
    93 Userspace:
    94  * [https://github.com/linux-can/can-utils can-utils] - a set of userspace community tools that are most commonly used for CAN over Linux
    95 
    96 
    97 === IMX6 Kernel drivers - SocketCAN
    98 SocketCAN is a set of open source CAN drivers and a networking stack contributed by Volkswagon Research to the Linux kernel and was formerly known as Low Level CAN Framework (LLCF).
    99 
     92SocketCAN is a set of open source CAN drivers and a networking stack contributed to the Linux Kernel by Volkswagon Research to the Linux kernel and was formerly known as Low Level CAN Framework (LLCF).
     93
     94The [https://github.com/linux-can/can-utils can-utils] project is a set of userspace community tools that are most commonly used with SocketCAN drivers for CAN over Linux.
     95
     96
     97[=#newport]
     98=== Newport CAN Kernel drivers
     99The Newport product family uses the [http://dev.gateworks.com/datasheets/MCP25625.pdf MCP25625] CAN over SPI device. This is both a CAN controller as well as a CAN transceiver. Because this operates over the SPI bus, the '''spi-cavium''' and '''spi-cavium-thunderx''' kernel drivers are required as well as the '''mcp251x''' driver. Because the Thunderx SPI controller only supports half-duplex transactions patches are needed to the mcp251x driver which Gateworks has in its [https://github.com/Gateworks/linux-newport linux-newport] kernel repository:
     100 - [https://github.com/Gateworks/linux-newport/commit/cb270339619ccf2b50dfd3604a03626f85830453 can: mcp251x: convert driver to half-duplex SPI]
     101 - [https://github.com/Gateworks/linux-newport/commit/d67245936bf53b0e83831ae98931c7ce6a89f2d2 can: mpc251x: wait for chip to come out of reset]
     102 - [https://github.com/Gateworks/linux-newport/commit/184249e625fcc99837e35df95de2624f91d23067 can: mcp251x: configure the interrupt type for level triggered]
     103
     104
     105[=#ventana]
     106=== Ventana IMX6 Kernel drivers
    100107The Freescale IMX6 FlexCAN module is a full implementation of the CAN protocol specification version 2.0 B which supports both standard and extended message frames. The '''flexcan''' driver source can be found at:
    101108 * [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/flexcan.c mainline linux kernel]
    … …  
    122129 * https://www.kernel.org/doc/Documentation/networking/can.txt - detailed socket API
    123130
    124 === can-utils ===
     131
     132[=#canutils]
     133=== can-utils
    125134The can-utils package is a sub-project of the SocketCAN project and is the more popular and maintained set of userspace configuration tools for SocketCAN interfaces.
    126135
    … …  
    128137
    129138Configure SocketCAN interface (using '''ip''' from the '''iproute2''' package) (for 250kbps in this example):
    130 {{{
     139{{{#!bash
    131140ip link set can0 type can bitrate 250000 listen-only off
    132141ip link set can0 up
    … …  
    134143
    135144Send a frame (consisting of 4 hex bytes to 0x100):
    136 {{{
     145{{{#!bash
    137146cansend can0 100#11.22.33.44
    138147}}}
    139148
    140149Receive frames:
    141 {{{
     150{{{#!bash
    142151candump can0
    143152}}}
    144153
    145154Example:
    146 {{{
     155{{{#!bash
    147156root@ventana:~# candump can0
    148157  can0  1CFF0105   [7]  47 9F 10 00 00 00 00
    … …  
    165174
    166175Notes:
    167  * see #TransceiverSTBY above to enable the SocketCAN transceiver
     176 * see [#STBY STBY] above to enable the SocketCAN transceiver
    168177
    169178Reference:
    … …  
    171180
    172181
     182[=#android]
    173183=== Android BSP
    174184 * Freescale has not released can-utils or userspace utilities for CAN in Android
    … …  
    189199
    190200
     201[=#hardware]
    191202= CAN Bus Hardware
    192203
     204[=#nmea2000]
    193205== NMEA 2000 Equipment
    194206Some examples of NMEA 2000 equipment we have tested our products with:
    … …  
    196208 * [http://www.lowrance.com/en-US/Products/NMEA-2000/Point-1-en-us.aspx Lowrance POINT-1 GPS] - NMEA 2000 GPS (12V powered 250kbps bitrate)
    197209
     210
    198211== Chip-Level
    199212An example chip that would interface to the Ventana board would be:
    … …  
    201214
    202215
    203 
     216[=#apgdt002]
    204217= CAN Bus Development Tools
    205218 - Microchip APGDT002 Can Bus Analyzer: