CAN总线技术及其在汽车中的应用课件_第1页
CAN总线技术及其在汽车中的应用课件_第2页
CAN总线技术及其在汽车中的应用课件_第3页
CAN总线技术及其在汽车中的应用课件_第4页
CAN总线技术及其在汽车中的应用课件_第5页
已阅读5页,还剩67页未读 继续免费阅读

下载本文档

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

文档简介

1、CAN总线技术及其在汽车中的应用网关PRND21!EFHCkm/hrpmTrip 000.0Odd 00000NEC仪表板胎压检测ABS雨刮控制无钥匙登入电动车窗CAN BUS自动空调发动机管理第1页,共72页。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 -

2、 Including 11-bit and 29-bit identifiers第2页,共72页。CAN总线概述第3页,共72页。第4页,共72页。第5页,共72页。第6页,共72页。第7页,共72页。第8页,共72页。CAN-C (J2284)第9页,共72页。CAN应用串行半双工线性总线结构通信CAN如何工作第10页,共72页。CAN不应用物理地址的概念,而是采用在CAN信息中包含ID的形式;ID是编程时的符号CAN如何工作第11页,共72页。应用中央控制器CAN控制器CAN收发器CAN总线独立的CAN控制器低端集成的CAN控制器高端独立的CAN控制器CAN硬件平台CAN如何工作第12页,

3、共72页。ISO/OSI七层结构CAN如何工作第13页,共72页。CAN与ISO/OSI七层结构对比CAN如何工作第14页,共72页。CAN中“层”的作用CAN如何工作第15页,共72页。物理传输CSMA/CD机制显性位竞争获胜CAN如何工作第16页,共72页。CAN如何工作第17页,共72页。CAN如何工作第18页,共72页。CAN数据传输采用包含位填充的NRZ编码技术例子:CAN如何工作第19页,共72页。消息优先级概念每一个消息都有一个ID,此ID用于选择性接收CAN总线上的数据,以及访问不同消息的优先级。CAN如何工作第20页,共72页。CAN仲裁机制:CAN如何工作第21页,共72页

4、。CAN协议和帧类型CAN信息格式:第22页,共72页。CAN协议和帧类型标准帧:11位ID第23页,共72页。CAN协议和帧类型扩展帧:29位ID第24页,共72页。CAN协议和帧类型Example:数据帧(RTR0)远程帧(RTR1)错误帧(连续6位电平相同)过载帧第25页,共72页。CAN协议和帧类型远程帧和数据帧:第26页,共72页。CAN协议和帧类型CAN控制场:第27页,共72页。CAN协议和帧类型CAN数据场:第28页,共72页。CAN协议和帧类型CRC场:CRC 场 = 15 bit CRC 序列 + 1 位隐性界定符.发送 节点从发送的以下场来计算 CRC 值: SOF Ar

5、bitration Field Control Field Data Field (if present)所有接收节点从接收到的以下场计算 CRC 值 : SOF Arbitration Field Control Field Data Field (if present) 比较两个CRC值.第29页,共72页。CAN协议和帧类型应答场:第30页,共72页。差错管理单元CAN节点的差错服务:差错检测:CAN节点校验CAN总线上的信息是否满足CAN标准;差错通知:每一个检测到差错的CAN节点以错误帧形式将差错信息 传送给所有其他节点。差错处理:错误记录,并转变为以下3种状态之一: 主动错误 被动

6、错误 总线断开第31页,共72页。差错管理单元CAN节点的错误类型: 位错误:发送和接收位不一致 填充错误:一帧中出现多于5位同样极性的电平 CRC错误: ACK错误: 格式错误第32页,共72页。差错管理单元第33页,共72页。差错管理单元第34页,共72页。差错管理单元第35页,共72页。CAN实现第36页,共72页。CAN实现第37页,共72页。CAN收发器第38页,共72页。CAN收发器第39页,共72页。第40页,共72页。第41页,共72页。第42页,共72页。第43页,共72页。第44页,共72页。第45页,共72页。第46页,共72页。第47页,共72页。CAN Data Fr

7、ameNode start transmitting Data Frame after Inter-Frame Space (IFS).The two bus values are called dominant 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 D

8、ata Frame (2.0B).Bit Stuffing - whenever 5 consecutive bits of equal value are transmitted, 1 extra bit of complementary value is automatically inserted into the bit stream: provides edges for clock resynchronization. Receivers automatically unstuff.第48页,共72页。CAN Remote Transmission Request (RTR) Fr

9、ameA node is allowed to start transmitting a Remote TransmissionRequest (RTR) Frame after Inter-Frame Space (IFS).Similar to a Data Frame, but no Data Field.Interpreted as a request for data that is associated with theIdentifier in the Arbitration Field.Seldom used by automotive manufacturers.第49页,共

10、72页。数据帧中为显性(0)远程帧中为隐性(1)标准帧中为显性(0)扩展帧中为隐性(1)第50页,共72页。替代远程请求位隐性(1)第51页,共72页。第52页,共72页。CAN Arbitration Field 2.0B (1)The 11-bit Identifier 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 re

11、cessive,per the CAN Specification.RTR bit : Dominant for Data Frame, recessive for RTR Frame.IDE bit : Dominant for a Standard Identifier.第53页,共72页。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 tra

12、nsmitted most significant bit (MSB) first.The 7 most significant bits of the Identifier must not all be recessive.SRR bit : Recessive for an Extended IdentifierIDE bit : Recessive for an Extended Identifier.RTR bit : Dominant for Data Frame, recessive for RTR Frame.第54页,共72页。CAN: Control FieldFirst

13、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 Data Frames (0-8 bytes).Data Length Code - no meaning for RTR Frames第55页,共72页。CAN Cyclic Redundancy Check (CRC) FieldCRC Field = 15 bit CRC Sequence + 1 recessive

14、 Delimiter bit.The transmitting node calculates the CRC from transmitted bit values of : SOF Arbitration Field Control Field Data Field (if present)All receiving nodes calculate the CRC from received bit values of : SOF Arbitration Field Control Field Data Field (if present) And compare this with th

15、e received CRC sequence.第56页,共72页。CAN Acknowledge FieldAcknowledge Field = ACK Slot bit + ACK Delimiter bitTransmitter transmits ACK Slot and ACK Delimiter as recessive.Receiver transmits a dominant bit during ACK Slot if it has received a valid message (no errors detected).Transmitter that does not

16、 receive dominant bit during ACK Slotrecognizes this as Acknowledge Error and will retransmit.第57页,共72页。 Intermission (3 recessive bits) No node is allowed to start transmitting a Data Frame or a RTR Frame during Intermission. BUT a dominant bit received during the 3rd bit time of Intermission will

17、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 the Identifier at the next bit time. ) Suspend Transmit (8 recessive bits) Only for Error Passive nodes which transmitted the previous message Th

18、is 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 node may start a transmission.第58页,共72页。CAN Error DetectionBit Error - Detected by a transmitter if the bit value received is different from the b

19、it 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. 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 a receiver if a fixed form bit field contains one or more illegal bits. Ac

温馨提示

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

评论

0/150

提交评论