文章

Classical CAN 简介

CAN总线是Controller Area Network的缩写,在OSI七层模型中是定义了数据链路层物理层

CAN总线是一种广播类型的串行总线。CAN总线无法对特定某个节点发送消息。CAN总线上的所有节点无差别地收到总线上所有消息,但可以过滤那些感兴趣的消息来做处理。

使用producer/consumer方式进行数据交换,每个节点都可以主动发送消息,也可以消费任何它所关心的消息。

CAN和CANopen在OSI模型中的位置

三代 CAN data link layer

  1. Classical CAN data link layer (1st generation)
  2. CAN FD data link layer (2nd generation)
  3. CAN XL data link layer (3rd generation)

使用CAN作为底层通讯协议的上层协议

主流的有CANopen,SAE J1939,ARINC 825,DeviceNet等。

CANopen (CiA 301) based on Classical CAN for general embedded real-time control CANopen FD (CiA 1301) based on CAN FD and CAN XL for embedded real-time control with advanced features J1939 profile for Classical CAN and CAN FD for commercial road vehicles Isobus profile based on Classical CAN for agriculture and forestry machines based on J1939 NMEA2000 profile based on Classical CAN for maritime applications based on J1939 Devicenet profile based on Classical CAN for factory automation

CAN消息类型:

数据帧, 远程帧, 错误帧,过载帧

总线仲裁

CAN总线是通过总线仲裁(Bus Arbitration)方式来决定哪个节点具有优先发送消息的权力。