Difference between revisions of "CAN Bus"

From eLinux.org
Jump to: navigation, search
m (Overview: added CAN wiki)
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
=== Overview ===
 
=== Overview ===
  
The CAN bus is an ISO standard bus for vehicles. It manages the Chassis Electrical System Control
+
The CAN bus is an ISO standard bus originally developed for vehicles. It manages the Chassis Electrical System Control
 
and is responsible for critical activities like engine electrical, and skid control. This system is also used
 
and is responsible for critical activities like engine electrical, and skid control. This system is also used
 
to provide vehicle diagnostic information for maintenance. A multi-star configuration seems typical of
 
to provide vehicle diagnostic information for maintenance. A multi-star configuration seems typical of
Line 8: Line 8:
 
for noise resistant signaling. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m.
 
for noise resistant signaling. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m.
 
Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s).
 
Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s).
 
 
(Jeremiah J. Flerchinger [[media:avc-lan.pdf|Source]])
 
(Jeremiah J. Flerchinger [[media:avc-lan.pdf|Source]])
  
additional information can be found at:
+
Although developed as car communication network CAN is used in many other areas, industrial, medical, maritime laboratory and more.
 +
Most often with a CAN based higher layer protocol like [[CANopen]] on top of it.
  
http://en.wikipedia.org/wiki/CAN_bus
+
Additional information can be found at:
 +
:
 +
:http://en.wikipedia.org/wiki/CAN_bus
 +
:
 +
:[https://plus.google.com/u/0/117660856159215855502 SocketCAN News]
 +
:
 +
:CiA [http://www.can-cia.org CAN in Automation] CAN user association
 +
:[http://www.can-wiki.info CAN Wiki]
  
 
=== CAN Support in Linux ===
 
=== CAN Support in Linux ===
  
The Linux kernel supports CAN with the SocketCAN framework.
+
CAN is supported by Linux device drivers. Mainly two types exist. Character device based drivers and network socket based drivers. The Linux kernel supports CAN with the SocketCAN framework.
  
 
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/networking/can.txt SocketCAN Documentation]
 
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/networking/can.txt SocketCAN Documentation]
* [http://developer.berlios.de/projects/socketcan/ Berlios Project Page]
+
* [http://vger.kernel.org/vger-lists.html#linux-can  mailing list for Linux Kernel CAN development]
 +
* [http://gitorious.org/linux-can linux-can git repository]
 +
* [http://developer.berlios.de/projects/socketcan/ Berlios Project Page (obsolete)]
  
=== SocketCAN Supported Controllers ===
+
One of the character based drivers is can4linux.
 +
 
 +
* [http://sourceforge.net/projects/can4linux/ SourceForge project page]
 +
* [http://de.wikipedia.org/wiki/Can4linux German Wikipedia article]
 +
* [http://en.wikipedia.org/wiki/Can4linux English Wikipedia article]
 +
 
 +
==== SocketCAN Supported Protocols ====
 +
* RAW: send & receive raw CAN frames
 +
* BCM: Broadcast manager, offload repetitive work to the Linux kernel
 +
* ISOTP ...
 +
* SAE [[J1939]]
 +
 
 +
==== SocketCAN Supported Controllers ====
 
* Microchip MCP251x
 
* Microchip MCP251x
 
* Atmel AT91 SoCs
 
* Atmel AT91 SoCs
 
* ESD 331 CAN Cards
 
* ESD 331 CAN Cards
* Philips SJA1000
+
* NXP (Philips) SJA1000
 
* Freescale MPC52xx SoCs
 
* Freescale MPC52xx SoCs
 
* Bosch CC770
 
* Bosch CC770
 
* Intel AN82527
 
* Intel AN82527
 +
* TIs SoCs
 +
* Serial/network devices utilizing ASCII protocol (slcan driver)
 +
 +
==== SocketCAN Support in Programming Languages/Environments ====
 +
* [[Android]]
 +
* [[Java]]
 +
* [[Python_Can | Python]]
 +
 +
==== can4linux Supported Controllers ====
 +
 +
* Analog Devices BlackFin BF537
 +
* Atmel AT91 SoCs
 +
* Freescale FlexCAN (ColdFire 5282, i.MX25, i.MX28, i.MX35)
 +
* Microchip Stand Alone CAN MCP2515
 +
* NXP Stand Alone CAN SJA1000 (on different ISA or PCI/PCIe boards)
 +
* Xilinx Zynq with XCAN
 +
* 'virtual' CAN mode without CAN hardware
 +
 +
==== can4linux Support in Programming Languages/Environments ====
 +
* [[Tcl/Tk]]
 +
* [[Python]]
 +
 +
 +
[[Category:Networking]]

Revision as of 17:46, 14 May 2013

Overview

The CAN bus is an ISO standard bus originally developed for vehicles. It manages the Chassis Electrical System Control and is responsible for critical activities like engine electrical, and skid control. This system is also used to provide vehicle diagnostic information for maintenance. A multi-star configuration seems typical of this bus with a primary bus line that branches into sub bus lines at its extremities then attaches to multiple device nodes. Differential voltage is applied over twisted pair at 1.5 to 2.5V and 2.5 to 3.5V for noise resistant signaling. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m. Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s). (Jeremiah J. Flerchinger Source)

Although developed as car communication network CAN is used in many other areas, industrial, medical, maritime laboratory and more. Most often with a CAN based higher layer protocol like CANopen on top of it.

Additional information can be found at:

http://en.wikipedia.org/wiki/CAN_bus
SocketCAN News
CiA CAN in Automation CAN user association
CAN Wiki

CAN Support in Linux

CAN is supported by Linux device drivers. Mainly two types exist. Character device based drivers and network socket based drivers. The Linux kernel supports CAN with the SocketCAN framework.

One of the character based drivers is can4linux.

SocketCAN Supported Protocols

  • RAW: send & receive raw CAN frames
  • BCM: Broadcast manager, offload repetitive work to the Linux kernel
  • ISOTP ...
  • SAE J1939

SocketCAN Supported Controllers

  • Microchip MCP251x
  • Atmel AT91 SoCs
  • ESD 331 CAN Cards
  • NXP (Philips) SJA1000
  • Freescale MPC52xx SoCs
  • Bosch CC770
  • Intel AN82527
  • TIs SoCs
  • Serial/network devices utilizing ASCII protocol (slcan driver)

SocketCAN Support in Programming Languages/Environments

can4linux Supported Controllers

  • Analog Devices BlackFin BF537
  • Atmel AT91 SoCs
  • Freescale FlexCAN (ColdFire 5282, i.MX25, i.MX28, i.MX35)
  • Microchip Stand Alone CAN MCP2515
  • NXP Stand Alone CAN SJA1000 (on different ISA or PCI/PCIe boards)
  • Xilinx Zynq with XCAN
  • 'virtual' CAN mode without CAN hardware

can4linux Support in Programming Languages/Environments