CAN总线070327.ppt_第1页
CAN总线070327.ppt_第2页
CAN总线070327.ppt_第3页
CAN总线070327.ppt_第4页
CAN总线070327.ppt_第5页
已阅读5页,还剩67页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、CAN总线技术及其在汽车中的应用,CAN Terminology Revealed .CAN 2.0 - Robert Bosch CAN Specification, Revision 2.0 .CAN 2.0 A - Formerly CAN 1.2, limited to 11-bit identifiers .CAN 2.0 B - Usually means complete protocol standard - Including 11-bit and 29-bit identifiers,CAN总线概述,CAN-C (J2284),CAN应用串行半双工线性总线结构通信,CAN不

2、应用物理地址的概念,而是采用在CAN信息中包含ID的形式;,ID是编程时的符号,应用,中央控制器,CAN控制器,CAN收发器,CAN总线,独立的CAN控制器,低端集成的CAN控制器,高端独立的CAN控制器,CAN硬件平台,ISO/OSI七层结构,CAN与ISO/OSI七层结构对比,CAN中“层”的作用,物理传输,CSMA/CD机制,显性位竞争获胜,CAN数据传输采用包含位填充的NRZ编码技术,例子:,消息优先级概念,每一个消息都有一个ID,此ID用于选择性接收CAN总线上的数据,以及访问不同消息的优先级。,CAN仲裁机制:,CAN信息格式:,标准帧:11位ID,扩展帧:29位ID,Exampl

3、e:,数据帧(RTR0) 远程帧(RTR1),错误帧(连续6位电平相同) 过载帧,远程帧和数据帧:,CAN控制场:,CAN数据场:,CRC场:,CRC 场 = 15 bit CRC 序列 + 1 位隐性界定符. 发送 节点从发送的以下场来计算 CRC 值: SOF Arbitration Field Control Field Data Field (if present) 所有接收节点从接收到的以下场计算 CRC 值 : SOF Arbitration Field Control Field Data Field (if present) 比较两个CRC值.,应答场:,CAN节点的差错服务:

4、,差错检测:CAN节点校验CAN总线上的信息是否满足CAN标准; 差错通知:每一个检测到差错的CAN节点以错误帧形式将差错信息 传送给所有其他节点。 差错处理:错误记录,并转变为以下3种状态之一: 主动错误 被动错误 总线断开,CAN节点的错误类型:, 位错误:发送和接收位不一致 填充错误:一帧中出现多于5位同样极性的电平 CRC错误: ACK错误: 格式错误,CAN Data Frame Node start transmitting Data Frame after Inter-Frame Space (IFS). The two bus values are called dominan

5、t and recessive. All receivers synchronize to leading edge of Start Of Frame (SOF). Arbitration Field is 12 bits for a Std Format Data Frame (2.0A/B). Arbitration Field is 32 bits for a Ext Format Data Frame (2.0B). Bit Stuffing - whenever 5 consecutive bits of equal value are transmitted, 1 extra b

6、it of complementary value is automatically inserted into the bit stream: provides edges for clock resynchronization. Receivers automatically unstuff.,CAN Remote Transmission Request (RTR) Frame A node is allowed to start transmitting a Remote Transmission Request (RTR) Frame after Inter-Frame Space

7、(IFS). Similar to a Data Frame, but no Data Field. Interpreted as a request for data that is associated with the Identifier in the Arbitration Field. Seldom used by automotive manufacturers.,数据帧中为显性(0) 远程帧中为隐性(1),标准帧中为显性(0) 扩展帧中为隐性(1),替代远程请求位 隐性(1),CAN Arbitration Field 2.0B (1) The 11-bit Identifie

8、r is labeled ID28 to ID18 in CAN2.0B. The Identifier is transmitted most significant bit (MSB) first. The 7 most significant bits of the Identifier must not all be recessive, per the CAN Specification. RTR bit : Dominant for Data Frame, recessive for RTR Frame. IDE bit : Dominant for a Standard Iden

9、tifier.,Arbitration Field 2.0B (2) The 11-bit Base Identifier is labeled ID28 to ID18. The 18-bit Extended Identifier is labeled ID17 to ID0. The Identifier is transmitted most significant bit (MSB) first. The 7 most significant bits of the Identifier must not all be recessive. SRR bit : Recessive f

10、or an Extended Identifier IDE bit : Recessive for an Extended Identifier. RTR bit : Dominant for Data Frame, recessive for RTR Frame.,CAN: Control Field First bit is called r1 in CAN2.0A, r1/IDE in CAN2.0B. First and second bits are always sent dominant. Data Length Code - number of data bytes for D

11、ata Frames (0-8 bytes). Data Length Code - no meaning for RTR Frames,CAN Cyclic Redundancy Check (CRC) Field CRC Field = 15 bit CRC Sequence + 1 recessive Delimiter bit. The transmitting node calculates the CRC from transmitted bit values of : SOF Arbitration Field Control Field Data Field (if prese

12、nt) All receiving nodes calculate the CRC from received bit values of : SOF Arbitration Field Control Field Data Field (if present) And compare this with the received CRC sequence.,CAN Acknowledge Field Acknowledge Field = ACK Slot bit + ACK Delimiter bit Transmitter transmits ACK Slot and ACK Delim

13、iter as recessive. Receiver transmits a dominant bit during ACK Slot if it has received a valid message (no errors detected). Transmitter that does not receive dominant bit during ACK Slot recognizes this as Acknowledge Error and will retransmit., Intermission (3 recessive bits) No node is allowed t

14、o start transmitting a Data Frame or a RTR Frame during Intermission. BUT a dominant bit received during the 3rd bit time of Intermission will be interpreted as SOF. ( Any error active node waiting to transmit which samples this dominant bit will synchronize to this edge and send the first bit of th

15、e Identifier at the next bit time. ) Suspend Transmit (8 recessive bits) Only for Error Passive nodes which transmitted the previous message This node may not start to transmit during Suspend Transmit, but all other nodes may. Bus Idle (arbitrary number of recessive bits) The bus is free and any nod

16、e may start a transmission.,CAN Error Detection Bit Error - Detected by a transmitter if the bit value received is different from the bit value transmitted.Exceptions:- sending a recessive bit and receiving a dominant bit during the Arbitration Field or the Ack Slot, or during a Passive Error flag.

17、Stuff Error - Detected by a receiver if 6 consecutive bit values are received during a message field that should be encoded by bit stuffing. CRC Error - Detected by a receiver if the CRC calculated by the receiver is different from the CRC received in the CRC Sequence field. Form Error - Detected by

18、 a receiver if a fixed form bit field contains one or more illegal bits. Acknowledge Error - Detected by a transmitter if it does not receive a dominant bit during the ACK Slot.,CAN Overload Frame Overload Frame transmitted when any of following are detected: Dominant bit during the 1st or 2nd bit of Intermission.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论