欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    CAN通讯协议介绍.ppt

    • 资源ID:70743818       资源大小:554.50KB        全文页数:63页
    • 资源格式: PPT        下载积分:11.9金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要11.9金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    CAN通讯协议介绍.ppt

    CAN Bus Hands-On CoursePresented by:Intrepid Control Systems,Inc.Qin WenSales EngineerTel:+86-137-6464-99561Objectives Learn the basics of the CAN protocol Understand what makes up a CAN network Understand what makes up a CAN node Learn how CAN compares to competitive protocols Learn how to use a CAN test tool and a CAN Database(DBC)file to monitor and transmit CAN messages and signals2Agenda Part 1:Learn the high level CAN features Part 2:Understand the CAN message Part 3:Understand how messages are communicated between CAN nodes3What is CAN?Stands for:ControllerArea Network Development of the CAN-bus started originally in 1983 at Robert Bosch GmbH The protocol was officially released in 1986 at the Society of Automotive Engineers(SAE)congress in Detroit 5CAN Key FeaturesSpeed up to 1MbpsNon-destructive message arbitrationAll nodes receive all messagesNo guaranteed message latency6Cost vs Data RateLINCANFlexRayMOST1 2 5 10Relative cost per nodeData rate bps20K1M10M25M7CAN vs LINCAN is much faster:up to 1 MbpsLIN offers a time deterministic modelCAN offers a more powerful checksumUses LDF instead of DBC files for databases8CAN vs FlexRayFlexRay network startup more complicatedFlexRay offers time deterministic communicationsFlexRay offers fault tolerance using various mechanismsFlexRay offers larger data framesUses FIBEX instead of DBC files9CAN vs MOSTMOST is targeted at infotainment applicationsMOST offers dedicated transfers in a ring network at 25 Mbps Optical,50 Mb Copper,and 150 Mbps optical physical layers10CAN Hardware FeaturesModerate cost silicon implementationRequires hardware CAN controller and CAN transceiverRequires hardware CAN transceiverMicroprocessorCAN TransceiverCAN ControllerCAN High CAN Low Ground11Quiz 11.CAN guarantees message latency.(True or False)2.CAN requires hardware controllers.(True or False)3.CAN is similar to LIN:both have very defined message structure.(True or False)4.What is the maximum number of bytes can be in a CAN message?12CAN Physical Layers High Speed CAN:up to 1 MbpsLow Speed Fault Tolerant CAN:up to 125 kbpsSingle Wire CAN:up to 83.3 kbps132.53.5V1.5tCAN HighCAN LowRecessiveDominantCAN Dual Wire Physical Layers 14CAN Node 1CAN Node 2CAN Node 3120 Ohm120 OhmCAN Dual Wire Termination15Single Wire Plus GroundTwo 120 Ohm termination resistorsBus length to 40 meters 1 Mbps,Slower=longer.SW Physical Layer 16DW/LSFT Physical LayerTwisted Pair(CANH/CANL)plus GroundTwo 120 Ohm termination resistorsBus length to 40 meters 1 Mbps,Slower=longer.17CAN SupportMultiple versions of CAN are supported in Value CAN and neoVI FIRE:High Speed CAN,LSFT CAN,Single Wire CANVehicle Spy provides full CAN support:CAN message and signal decoding,logging,CAN node simulation18 Lab 1:ObjectivesGet familiar with Intrepid CAN/LIN boardFind USB power connectorFind CAN and neoVI power connectorLocate LIN and CAN transceivers on the boardConnect USB and power cablesConnect neoVI to the board19 Intrepid CAN/LIN BoardTwo identical connected CAN nodesPower is supplied through USBCAN connectors for neoVI and ValueCANPower connector for neoVI20Intrepid BoardTwo CAN transceivers with test pointsTwo reset buttons21Quiz 21.CAN bus requires termination of 1200 Ohm(True or False)2.CAN requires three lines:CAN low,CAN High and ground(True or False)3.Single wire CAN is in general the slowest CAN type.(True or False)22CAN Data FrameTypical CAN message is called data frameNumber of data bytes:0-8CAN Data FrameProtocol OverheadData BytesProtocol Overhead24CAN Frame FieldsArbitration field represents frame IDControl field has defines frame lengthCRC stands for Cyclic Redundancy Check:this is CAN frame checksumACK is acknowledge field:confirms frame receptionCAN Data FrameData BytesArbitration FieldControlFieldCRCACK25Arbitration FieldIdentifier assigns 11 bit ID to CAN frames Remote Transmit Request(RTR)bitCAN node sends CAN frame with recessive RTR bit(logical 1)when the node requests data from other nodesData BytesControlFieldIdentifierRTR111Arbitration FieldCRCACK26CAN Remote FrameIdentical to the Data Frame,except there is no data bytesRTR bit is recessive(logical 1)ControlFieldCRCACKArbitration Field27Control FieldDLC specifies number of data bytes:0-8RB0 bit is set to logical 0 and reserved for the future protocols IDE bit defines data frame type:standard ID or extended ID data frameIDE bits:dominant for standard and recessive for extended data frameData BytesIdentifierIDEControl Field1 1 4RB0DLCCRCACK28Extended Data FrameSimilar to standard data frameIdentifier is 29 bits longIdentifier is split into two parts:ID1 and ID2Data BytesSRR11 1 1 18 1IDEID1CRCACKID2RTRArbitration FieldControlField29Standard and Extended FramesData BytesControlFieldIdentifierRTR111CRCACKData BytesSRR11 1 1 18 1IDEID1CRCACKID2RTRArbitration FieldControlFieldArbitration Field30CRC FieldCRC:Cyclic Redundancy CheckCRC is calculated and put on the bus by transmitting nodeCRC is computed again by the receiving node:if it does not match,then an error frame is sent and the data frame is sent again by the transmitter.CRC field is 15 bit long and has 1 bit delimiterDelimiter always should be logical 1Data BytesArbitration FieldControlFieldCRCACKDel31ACK FieldACK:Acknowledge fieldIf CAN node received the message correctly it should set ACK bit as dominant bit(logical 0)At least one receiver should set ACK to dominant bit.If not,an error frame if generated and the transmitter resends the frameACK delimiter:1 bit always should be logical 1Data BytesArbitration FieldControlFieldCRCACKDelDel32 Lab 2:ObjectivesGet familiar with WaveBPS softwareConnected WaveBPS to Intrepid board using the oscilloscopeRun WaveBPS and monitor CAN waveforms coming from the boardIdentify CAN high and CAN low linesMeasure one bit length in time and compute corresponding CAN baudrate33Quiz 31.What is the main difference between a remote frame and a data frame?2.Control field contains the number of CAN data bytes(True or False)3.What is the main difference between a standard and extended CAN frames?4.If a node received a CAN frame correctly,how would this affect ACK field of the frame?34CAN Arbitration Any node can transmit when bus is free Multiple node transmission is resolved by bitwise arbitration using ID field Non destructive frame arbitration36CAN Arbitration Higher priority frames win arbitration Data frames win arbitration over remote frames Nodes always monitor the bus If there is a dominant bit on the bus,and a node wants to send a recessive bit,the node loses arbitration 371011001101110110010011LSBMSBNode wants to send CAN frame with this ID:Other node ID:CAN Arbitration Example38Start and End of FrameAll data and remote frames have start and end waveformsStart of frame is 1 dominant bit End of frame(EOF)is 7 recessive bitsIntermission field is 3 recessive bits:overload frame can be sent during the first intermission bitCAN Data or Remote FrameStart BitEOF INTIdle Bus39Overload FrameOverload frame is sent when receiver requires a delay,orDominant bit was detected during intermissonAt most two overload frames can be generated to delay next data or remote frameOverload flag from nodes is 6 bits highOverload frameSuperposition of overload flags from nodes(6 bits dom.)Delimiter6-12 bits8 bits HighEOF40Error FrameError frame is sent when a node detects error condition on the busActive Error flag from nodes is 6 bits highError frameSuperposition of overload flags from nodes(6 bits dom.)Delimiter6-12 bits8 bits HighEOF41Checksum ErrorCRC is computed by transmitter and put on the busReceiving node calculates CRC and compares it with CRC fieldIf CRC does not match,error frame is generated and transmitter resends the messageCAN Data FrameData BytesArbitration FieldControlFieldCRCACK42Acknowledge Error At least one receiver must set ACK bit dominant If not,an error frame is generated and the transmitter resends the message Data BytesArbitration FieldControlFieldCRCDelACK43Form Error Condition:fixed form fields have illegal bits:dominant bit(logical 0)is detected in the delimiters,End of Frame(EOF)or inter-frame space Transmitter then send error frame and resends the messageCAN Data or Remote FrameEOF INTIdle BusDelDel44Stuff Error Condition:6 consecutive bits of the same state in non-fixed form fields CAN bit stuffing algorithm inserts additional bits into CAN frame to make sure there is no more than 5 consecutive bits of the same level The transmitter resends the messageCAN Data FrameData BytesArbitration FieldControlFieldCRCACK45Bit Error Condition:transmitter monitors what it sends and detects a bit state opposite to what it put on the bus Exclude Arbitration and ACK fieldCAN Data FrameData BytesArbitration FieldControlFieldCRCACK46Fault Confinement What happens when transmitter detects an error and keeps sending error frames?Endless loop problem:transmitter sends bad frame and the receiver error frames it Solution:node fault confinement.It maintains CAN TX and RX error counters,and isolate nodes from the communication after certain numbers of errors47Fault Confinement States Three states Error active nodes:take part in the communication and send error active flags when errors are detected Error passive nodes:take part in the communication but can only send error passive flags After transmission,error passive nodes send additional 8 recessive bits after intermission field it is called“Suspend Transmission”field Bus off nodes:no influence on the bus48Fault ConfinementErrorCounters TEC:000 REC:000Error ActiveError Active REC:001 TEC:000 REC:002 TEC:001 REC:003 TEC:002 REC:004 TEC:004 REC:010 TEC:011 REC:018 TEC:026 REC:029 TEC:052 REC:029 TEC:097 REC:031 TEC:129 REC:033 TEC:185 REC:042 TEC:211 REC:047 TEC:233 REC:051 TEC:256ErrorCountersTEC:000REC:000 REC:000 TEC:000ErrorCountersTEC:000REC:000 REC:001 TEC:000 REC:000 TEC:000 REC:001 TEC:000 REC:002 TEC:000 REC:001 TEC:000 REC:002 TEC:000 3 Error States:Error Active,Error Passive,Bus OffCAN Node 1CAN Node 2CAN Node 3Error ActiveError PassiveBUS OFFReceive Error CounterIf receiver sends an error frame:REC+1If receiver was first to start an error frame:REC+8If receiver monitors a BIT ERROR while sending an error frame:REC+8After successfully receiving a message:REC-150Transmit Error CounterIf transmitter sends an error frame:TEC+8If transmitter monitors a BIT ERROR while sending an error frame:TEC+8After successfully transmitting a message:TEC-1If TEC reaches 127:Cannot send Error Frames,but can Tx/Rx51 Lab 3:ObjectivesGet familiar with Vehicle Spy softwareCreate a message that is sent periodicallyPut that message into the 2nd node on the EVBFind our message amongst all the messages52Quiz 41.Overload frame is sent when receiver requires a delay.(True or False)2.Under what conditions does a form error occur?3.Stuff bits are inserted only if there are 5 consecutive bits of the same state on the bus.(True or False)53CAN Bit Timing Issues All nodes must receive TX waveform“simultaneously”for arbitration Varying Delays for different nodes Resynchronization:no common clock between nodes57CAN Bit Timing Issues Each bit has four parts and the sampling point Each part of the bit consists of a number of time quantas Sample point at 70-80%of bitSYNC_SEGPROP_SEGPHASE_SEG1PHASE_SEG21 bit in CAN frameSample point58High Level Protocols Examples:Ford SCP is a HLP to J1850 and so is Class 2 CAN HLP:J1939,GMLAN are on top of CAN CAN HLP:CAN Calibration Protocol(CCP)CAN HLP:DeviceNet59DBC Files Industry standard DBC file format DBC files describe the structure for signals that CAN frames could contain Vehicle Spy supports DBC files for message decoding60Quiz 51.CAN frame arbitration takes into account frame ID and frame data bytes.(True of False)2.During CAN arbitration a dominant bit(logical 0)always wins arbitration vs a recessive bit(logical 1)(True or False)3.What is bit sampling point?Can we change it?62Thank you for your attentionQuestions?63

    注意事项

    本文(CAN通讯协议介绍.ppt)为本站会员(wuy****n92)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开