CAN总线ppt课件

上传人:壹****1 文档编号:569773559 上传时间:2024-07-31 格式:PPT 页数:72 大小:6.35MB
返回 下载 相关 举报
CAN总线ppt课件_第1页
第1页 / 共72页
CAN总线ppt课件_第2页
第2页 / 共72页
CAN总线ppt课件_第3页
第3页 / 共72页
CAN总线ppt课件_第4页
第4页 / 共72页
CAN总线ppt课件_第5页
第5页 / 共72页
点击查看更多>>
资源描述

《CAN总线ppt课件》由会员分享,可在线阅读,更多相关《CAN总线ppt课件(72页珍藏版)》请在金锄头文库上搜索。

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

2、Usually means complete protocol standard - Including 11-bit and 29-bit identifierspagepage3 3CANCAN总线概述总线概述pagepage4 4pagepage5 5pagepage6 6pagepage7 7pagepage8 8pagepage9 9CAN-C (J2284)pagepage1010CANCAN应用串行半双工线性总线结构通信应用串行半双工线性总线结构通信CANCAN如何工作如何工作pagepage1111CANCANCANCAN不应用物理地址的概念,而是采用在不应用物理地址的概念,而

3、是采用在CANCAN信息信息中包含中包含IDID的形式;的形式;IDID是编程时的符号是编程时的符号CANCAN如何工作如何工作pagepage1212应用应用中央控制器中央控制器CANCAN控制器控制器CANCAN收发器收发器CANCAN总线总线独立的独立的CANCAN控制器控制器低端集成的低端集成的CANCAN控制器控制器高端独立的高端独立的CANCAN控制器控制器CANCAN硬件平台硬件平台CANCAN如何工作如何工作pagepage1313ISO/OSIISO/OSI七层结构七层结构CANCAN如何工作如何工作pagepage1414CANCAN与与ISO/OSIISO/OSI七层结构

4、对比七层结构对比CANCAN如何工作如何工作pagepage1515CANCAN中中“层层”的作用的作用CANCAN如何工作如何工作pagepage1616物理传输物理传输CSMA/CDCSMA/CD机制机制显性位显性位竞争获胜竞争获胜CANCAN如何工作如何工作pagepage1717CANCAN如何工作如何工作pagepage1818CANCAN如何工作如何工作pagepage1919CANCAN数据传输采用包含位填数据传输采用包含位填充的充的NRZNRZ编码技术编码技术例子:例子:CANCAN如何工作如何工作pagepage2020消息优先级概念消息优先级概念每一个消息都有一个每一个消息

5、都有一个IDID,此,此IDID用于选择性接收用于选择性接收CANCAN总线上的数总线上的数据,以及访问不同消息的优先级。据,以及访问不同消息的优先级。CANCAN如何工作如何工作pagepage2121CANCAN仲裁机制:仲裁机制:CANCAN如何工作如何工作pagepage2222CANCAN协议和帧类型协议和帧类型CANCAN信息格式:信息格式:pagepage2323CANCAN协议和帧类型协议和帧类型标准帧:标准帧:1111位位IDIDpagepage2424CANCAN协议和帧类型协议和帧类型扩展帧:扩展帧:2929位位IDIDpagepage2525CANCAN协议和帧类型协议

6、和帧类型ExampleExample: :数据帧(数据帧(RTRRTR0 0)远程帧(远程帧(RTRRTR1 1)错误帧(连续错误帧(连续6 6位电平相同)位电平相同)过载帧过载帧pagepage2626CANCAN协议和帧类型协议和帧类型远程帧和数据帧:远程帧和数据帧:pagepage2727CANCAN协议和帧类型协议和帧类型CANCAN控制场:控制场:pagepage2828CANCAN协议和帧类型协议和帧类型CANCAN数据场:数据场:pagepage2929CANCAN协议和帧类型协议和帧类型CRCCRC场:场:CRC 场 = 15 bit CRC 序列 + 1 位隐性位隐性界定符.

7、发送发送 节点从发送的以下场来计算 CRC 值: SOF Arbitration Field Control Field Data Field (if present)所有接收节点从接收到的以下场计算 CRC 值 : SOF Arbitration Field Control Field Data Field (if present) 比较两个CRC值.pagepage3030CANCAN协议和帧类型协议和帧类型应答场:应答场:pagepage3131差错管理单元差错管理单元CANCAN节点的差错服务:节点的差错服务:差错检测:差错检测:CANCAN节点校验节点校验CANCAN总线上的信息是否

8、满足总线上的信息是否满足CANCAN标准;标准;差错通知:差错通知:每一个检测到差错的每一个检测到差错的CANCAN节点以错误帧形式将差错信息节点以错误帧形式将差错信息 传送给所有其他节点。传送给所有其他节点。差错处理:差错处理:错误记录,并转变为以下错误记录,并转变为以下3 3种状态之一:种状态之一: 主动错误主动错误 被动错误被动错误 总线断开总线断开pagepage3232差错管理单元差错管理单元CANCAN节点的错误类型:节点的错误类型: 位错误:位错误:发送和接收位不一致发送和接收位不一致 填充错误:一帧中填充错误:一帧中出现多于出现多于5 5位同样极性的电平位同样极性的电平 CRC

9、CRC错误:错误: ACKACK错误:错误: 格式错误格式错误pagepage3333差错管理单元差错管理单元pagepage3434差错管理单元差错管理单元pagepage3535差错管理单元差错管理单元pagepage3636CANCAN实现实现pagepage3737CANCAN实现实现pagepage3838CANCAN收发器收发器pagepage3939CANCAN收发器收发器pagepage4040pagepage4141pagepage4242pagepage4343pagepage4444pagepage4545pagepage4646pagepage4747pagepage4

10、848CAN Data FrameNode 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

11、a Ext Format Data 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.pagepage4949CAN Remote Transmission

12、Request (RTR) FrameA 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 manu

13、facturers.pagepage5050数据帧中为显性(数据帧中为显性(数据帧中为显性(数据帧中为显性(0 0 0 0)远程帧中为隐性(远程帧中为隐性(远程帧中为隐性(远程帧中为隐性(1 1 1 1)标准帧中为显性(标准帧中为显性(标准帧中为显性(标准帧中为显性(0 0 0 0)扩展帧中为隐性(扩展帧中为隐性(扩展帧中为隐性(扩展帧中为隐性(1 1 1 1)pagepage5151替代远程请求位替代远程请求位替代远程请求位替代远程请求位隐性(隐性(隐性(隐性(1 1 1 1)pagepage5252pagepage5353CAN Arbitration Field 2.0B (1)The

14、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 recessive,per the CAN Specification.RTR bit : Dominant for Data Frame, recessive for RTR Frame.IDE bit : Dominant for a St

15、andard Identifier.pagepage5454Arbitration 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

16、bit : Recessive for an Extended IdentifierIDE bit : Recessive for an Extended Identifier.RTR bit : Dominant for Data Frame, recessive for RTR Frame.pagepage5555CAN: Control FieldFirst bit is called r1 in CAN2.0A, r1/IDE in CAN2.0B.First and second bits are always sent dominant.Data Length Code - num

17、ber of data bytes for Data Frames (0-8 bytes).Data Length Code - no meaning for RTR Framespagepage5656CAN Cyclic Redundancy Check (CRC) FieldCRC Field = 15 bit CRC Sequence + 1 recessive Delimiter bit.The transmitting node calculates the CRC from transmitted bit values of : SOF Arbitration Field Con

18、trol 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 the received CRC sequence.pagepage5757CAN Acknowledge FieldAcknowledge Field = ACK Slot bit + ACK Delimiter bitTrans

19、mitter 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 receive dominant bit during ACK Slotrecognizes this as Acknowledge Error and will retransmit.pagepage5858 Inter

20、mission (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 be interpreted as SOF. ( Any error active node waiting to transmit which samples this dominant bit will synchr

21、onize 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 This node may not start to transmit during Suspend Transmit, but all other nodes may. Bus Idle (arbitrary number

22、 of recessive bits) The bus is free and any node may start a transmission.pagepage5959CAN Error DetectionBit 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 Arbitratio

23、n 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 rec

24、eived in the CRC Sequence field. Form Error - Detected by 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.pagepage6060CAN Overload FrameOverload Frame transmitted when any

25、of following are detected: Dominant bit during the 1st or 2nd bit of Intermission. Dominant bit during the 8th (last) bit of Error Delimiter or Overload DelimiterReceiver permitted to initiate an Overload Frame when not ready to receive new data (not usually implemented).A maximum of 2 consecutive Overload Frames may be generated.pagepage6161Requirements of a CAN Controllerpagepage6262pagepage6363pagepage6464pagepage6565pagepage6666pagepage6767pagepage6868pagepage6969pagepage7070pagepage7171pagepage7272

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 医学/心理学 > 基础医学

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号