![CAN通訊協(xié)議介紹_第1頁](http://file4.renrendoc.com/view/5d28f2610cf55741e17c8770bcb8014d/5d28f2610cf55741e17c8770bcb8014d1.gif)
![CAN通訊協(xié)議介紹_第2頁](http://file4.renrendoc.com/view/5d28f2610cf55741e17c8770bcb8014d/5d28f2610cf55741e17c8770bcb8014d2.gif)
![CAN通訊協(xié)議介紹_第3頁](http://file4.renrendoc.com/view/5d28f2610cf55741e17c8770bcb8014d/5d28f2610cf55741e17c8770bcb8014d3.gif)
![CAN通訊協(xié)議介紹_第4頁](http://file4.renrendoc.com/view/5d28f2610cf55741e17c8770bcb8014d/5d28f2610cf55741e17c8770bcb8014d4.gif)
![CAN通訊協(xié)議介紹_第5頁](http://file4.renrendoc.com/view/5d28f2610cf55741e17c8770bcb8014d/5d28f2610cf55741e17c8770bcb8014d5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
會計學(xué)1CAN通訊協(xié)議介紹2Agenda
Part1:LearnthehighlevelCANfeatures
Part2:UnderstandtheCANmessage
Part3:UnderstandhowmessagesarecommunicatedbetweenCANnodes第1頁/共62頁3Part1:
TheBigPicture第2頁/共62頁4WhatisCAN?Standsfor:Controller–AreaNetwork
DevelopmentoftheCAN-busstartedoriginallyin1983atRobertBoschGmbH
Theprotocolwasofficiallyreleasedin1986attheSocietyofAutomotiveEngineers(SAE)congressinDetroit第3頁/共62頁5CANKeyFeaturesSpeedupto1MbpsNon-destructivemessagearbitrationAllnodesreceiveallmessagesNoguaranteedmessagelatency第4頁/共62頁6CostvsDataRateLINCANFlexRayMOST12510RelativecostpernodeDatarate[bps]20K1M10M25M第5頁/共62頁7CANvsLINCANismuchfaster:upto1MbpsLINoffersatimedeterministicmodelCANoffersamorepowerfulchecksumUsesLDFinsteadofDBCfilesfordatabases第6頁/共62頁8CANvsFlexRayFlexRaynetworkstartupmorecomplicatedFlexRayofferstimedeterministiccommunicationsFlexRayoffersfaulttoleranceusingvariousmechanismsFlexRayofferslargerdataframesUsesFIBEXinsteadofDBCfiles第7頁/共62頁9CANvsMOSTMOSTistargetedatinfotainmentapplicationsMOSToffersdedicatedtransfersinaringnetworkat25MbpsOptical,50MbCopper,and150Mbpsopticalphysicallayers第8頁/共62頁10CANHardwareFeaturesModeratecostsiliconimplementationRequireshardwareCANcontrollerandCANtransceiverRequireshardwareCANtransceiverMicroprocessorCAN
TransceiverCANControllerCANHighCANLowGround第9頁/共62頁11Quiz11.CANguaranteesmessagelatency.
(TrueorFalse)?2.CANrequireshardwarecontrollers.
(TrueorFalse)?3.CANissimilartoLIN:bothhaveverydefinedmessagestructure.
(TrueorFalse)?4.Whatisthemaximumnumberofbytes
canbeinaCANmessage?第10頁/共62頁12CANPhysicalLayersHighSpeedCAN:upto1MbpsLowSpeedFaultTolerantCAN:
upto125kbpsSingleWireCAN:upto83.3kbps第11頁/共62頁132.53.5V1.5tCANHighCANLowRecessiveDominantCANDualWirePhysicalLayers
第12頁/共62頁14CANNode1CANNode2CANNode3120Ohm120OhmCANDualWireTermination第13頁/共62頁15SingleWirePlusGroundTwo120OhmterminationresistorsBuslengthto40meters@1Mbps,Slower=longer.SWPhysicalLayer第14頁/共62頁16DW/LSFTPhysicalLayerTwistedPair(CANH/CANL)plusGroundTwo120OhmterminationresistorsBuslengthto40meters@1Mbps,Slower=>longer.第15頁/共62頁17CANSupportMultipleversionsofCANaresupportedinValueCANandneoVIFIRE:HighSpeedCAN,LSFTCAN,SingleWireCANVehicleSpyprovidesfullCANsupport:
CANmessageandsignaldecoding,
logging,CANnodesimulation第16頁/共62頁18Lab1:ObjectivesGetfamiliarwithIntrepidCAN/LINboardFindUSBpowerconnectorFindCANandneoVIpowerconnectorLocateLINandCANtransceiverson
theboardConnectUSBandpowercablesConnectneoVItotheboard第17頁/共62頁19IntrepidCAN/LINBoardTwoidenticalconnectedCANnodesPowerissuppliedthroughUSBCANconnectorsforneoVIandValueCANPowerconnectorforneoVI第18頁/共62頁20IntrepidBoardTwoCANtransceiverswithtestpointsTworesetbuttons第19頁/共62頁21Quiz21.CANbusrequiresterminationof1200Ohm
(TrueorFalse)?2.CANrequiresthreelines:CANlow,CANHighandground
(TrueorFalse)?3.SinglewireCANisingeneraltheslowestCANtype.
(TrueorFalse)?第20頁/共62頁22Part2:
TheCANmessage第21頁/共62頁23CANDataFrameTypicalCANmessageiscalleddataframeNumberofdatabytes:0-8CANDataFrameProtocolOverheadDataBytesProtocolOverhead第22頁/共62頁24CANFrameFieldsArbitrationfieldrepresentsframeIDControlfieldhasdefinesframelengthCRCstandsforCyclicRedundancyCheck:
thisisCANframechecksumACKisacknowledgefield:confirmsframereceptionCANDataFrameDataBytesArbitrationFieldControl
FieldCRCACK第23頁/共62頁25ArbitrationFieldIdentifierassigns11bitIDtoCANframesRemoteTransmitRequest(RTR)bitCANnodesendsCANframewithrecessiveRTRbit(logical1)whenthenoderequestsdatafrom
othernodesDataBytesControl
FieldIdentifierRTR111ArbitrationFieldCRCACK第24頁/共62頁26CANRemoteFrameIdenticaltotheDataFrame,except
thereisnodatabytesRTRbitisrecessive(logical1)?Control
FieldCRCACKArbitrationField第25頁/共62頁27ControlFieldDLCspecifiesnumberofdatabytes:0-8RB0bitissettological0andreservedforthefutureprotocolsIDEbitdefinesdataframetype:standardIDorextendedIDdataframeIDEbits:dominantforstandardandrecessiveforextendeddataframeDataBytesIdentifierIDEControlField114RB0DLCCRCACK第26頁/共62頁28ExtendedDataFrameSimilartostandarddataframeIdentifieris29bitslongIdentifierissplitintotwoparts:ID1andID2Data
BytesSRR1111181IDEID1CRCACKID2RTRArbitrationFieldControl
Field第27頁/共62頁29StandardandExtendedFramesDataBytesControl
FieldIdentifierRTR111CRCACKData
BytesSRR1111181IDEID1CRCACKID2RTRArbitrationFieldControl
FieldArbitrationField第28頁/共62頁30CRCFieldCRC:CyclicRedundancyCheckCRCiscalculatedandputonthebusbytransmittingnodeCRCiscomputedagainbythereceivingnode:ifitdoesnotmatch,thenanerrorframeissentandthedataframeissentagainbythetransmitter.CRCfieldis15bitlongandhas1bitdelimiterDelimiteralwaysshouldbelogical1DataBytesArbitrationFieldControl
FieldCRCACKDel第29頁/共62頁31ACKFieldACK:AcknowledgefieldIfCANnodereceivedthemessagecorrectlyitshouldsetACKbitasdominantbit(logical0)AtleastonereceivershouldsetACKtodominantbit.Ifnot,anerrorframeifgeneratedand
thetransmitterresendstheframeACKdelimiter:1bitalwaysshouldbelogical1DataBytesArbitrationFieldControl
FieldCRCACKDelDel第30頁/共62頁32Lab2:ObjectivesGetfamiliarwithWaveBPSsoftwareConnectedWaveBPStoIntrepidboardusingtheoscilloscopeRunWaveBPSandmonitorCANwaveformscomingfromtheboardIdentifyCANhighandCANlowlinesMeasureonebitlengthintimeandcomputecorrespondingCANbaudrate第31頁/共62頁33Quiz3Whatisthemaindifferencebetweenaremoteframeandadataframe?ControlfieldcontainsthenumberofCANdatabytes(TrueorFalse)?3.WhatisthemaindifferencebetweenastandardandextendedCANframes?4.IfanodereceivedaCANframecorrectly,howwouldthisaffectACKfieldoftheframe?第32頁/共62頁34Part3:
Messagesendingandreceiving第33頁/共62頁35CANArbitrationAnynodecantransmitwhenbusisfreeMultiplenodetransmissionisresolvedbybitwisearbitrationusingIDfieldNondestructiveframearbitration第34頁/共62頁36CANArbitrationHigherpriorityframeswinarbitrationDataframeswinarbitrationoverremoteframesNodesalwaysmonitorthebusIfthereisadominantbitonthebus,andanodewantstosendarecessivebit,thenodelosesarbitration第35頁/共62頁371011001101110110010011LSBMSBNodewantstosendCANframewiththisID:OthernodeID:CANArbitrationExample第36頁/共62頁38StartandEndofFrameAlldataandremoteframeshavestartand
endwaveformsStartofframeis1dominantbitEndofframe(EOF)is7recessivebitsIntermissionfieldis3recessivebits:overloadframecanbesentduringthefirstintermissionbitCANDataorRemoteFrameStartBitEOFINTIdle
Bus第37頁/共62頁39OverloadFrameOverloadframeissentwhenreceiverrequires
adelay,orDominantbitwasdetectedduringintermissonAtmosttwooverloadframescanbegeneratedtodelaynextdataorremoteframeOverloadflagfromnodesis6bitshighOverloadframeSuperpositionofoverloadflagsfromnodes(6bitsdom.)?Delimiter6-12bits8bitsHighEOF第38頁/共62頁40ErrorFrameErrorframeissentwhenanodedetects
errorconditiononthebusActiveErrorflagfromnodesis6bitshighErrorframeSuperpositionofoverloadflagsfromnodes(6bitsdom.)?Delimiter6-12bits8bitsHighEOF第39頁/共62頁41ChecksumErrorCRCiscomputedbytransmitterandputonthebusReceivingnodecalculatesCRCandcomparesit
withCRCfieldIfCRCdoesnotmatch,errorframeisgeneratedandtransmitterresendsthemessageCANDataFrameDataBytesArbitrationFieldControl
FieldCRCACK第40頁/共62頁42AcknowledgeErrorAtleastonereceivermustsetACKbitdominantIfnot,anerrorframeisgeneratedandthetransmitterresendsthemessageDataBytesArbitrationFieldControl
FieldCRCDelACK第41頁/共62頁43FormErrorCondition:fixedformfieldshaveillegalbits:dominantbit(logical0)isdetectedinthedelimiters,EndofFrame(EOF)orinter-framespaceTransmitterthensenderrorframeandresendsthemessageCANDataorRemoteFrameEOFINTIdle
BusDelDel第42頁/共62頁44StuffErrorCondition:6consecutivebitsofthesamestateinnon-fixedformfieldsCANbitstuffingalgorithminsertsadditionalbitsintoCANframetomakesurethereisnomorethan5consecutivebitsofthesamelevelThetransmitterresendsthemessageCANDataFrameDataBytesArbitrationFieldControl
FieldCRCACK第43頁/共62頁45BitErrorCondition:transmittermonitorswhatitsendsanddetectsabitstateoppositetowhatitputonthebusExcludeArbitrationandACKfieldCANDataFrameDataBytesArbitrationFieldControl
FieldCRCACK第44頁/共62頁46FaultConfinement
Whathappenswhentransmitterdetectsanerrorandkeepssendingerrorframes?Endlessloopproblem:transmittersendsbadframeandthereceivererrorframesitSolution:nodefaultconfinement.ItmaintainsCANTXandRXerrorcounters,andisolatenodesfromthecommunicationaftercertainnumbersoferrors第45頁/共62頁47FaultConfinementStatesThreestatesErroractivenodes:takepartinthecommunicationandsenderroractiveflagswhenerrorsaredetectedErrorpassivenodes:takepartinthecommunicationbutcanonlysenderrorpassiveflagsAftertransmission,errorpassivenodessendadditional8recessivebitsafterintermissionfield–itiscalled“SuspendTransmission”fieldBusoffnodes:noinfluenceonthebus第46頁/共62頁FaultConfinementErrorCountersTEC:000REC:000ErrorActiveErrorActiveREC:001TEC:000REC:002TEC:001REC:003TEC:002REC:004TEC:004REC:010TEC:011REC:018TEC:026REC:029TEC:052REC:029TEC:097REC:031TEC:129REC:033TEC:185REC:042TEC:211REC:047TEC:233REC:051TEC:256ErrorCountersTEC:000REC:000REC:000TEC:000ErrorCountersTEC:000REC:000REC:001TEC:000REC:000TEC:000REC:001TEC:000REC:002TEC:000REC:001TEC:000REC:002TEC:0003ErrorStates:ErrorActive,ErrorPassive,BusOffCANNode1CANNode2CANNode3ErrorActiveErrorPassiveBUSOFF第47頁/共62頁49ReceiveErrorCounterIfreceiversendsanerrorframe:REC+1
Ifreceiverwasfirsttostartanerrorframe:
REC+8
IfreceivermonitorsaBITERRORwhilesendinganerrorframe:
REC+8
Aftersuccessfullyreceivingamessage:
REC-1
第48頁/共62頁50TransmitErrorCounterIftransmittersendsanerrorframe:TEC+8
IftransmittermonitorsaBITERRORwhilesendinganerrorframe:
TEC+8
Aftersuccessfullytransmittingamessage:
TEC-1
IfTECreaches127:
CannotsendErrorFrames,butcanTx/Rx第49頁/共62頁51Lab3:ObjectivesGetfamiliarwithVehicleSpysoftwareCreateamessagethatissentperiodicallyPutthatmessageintothe2ndnodeontheEVBFindourmessageamongstallthemessages第50頁/共62頁52Quiz4Overloadframeissentwhenreceiverrequiresadelay.
(TrueorFalse)?2.Underwhatconditionsdoesaformerroroccur?3.Stuffbitsareinsertedonlyifthereare5consecutivebitsofthesamestateonthebus.
(TrueorFalse)?第51頁/共62頁53CANArbitrationAnynodecantransmitwhenbusisfreeMultiplenodetransmissionisresolvedbybitwisearbitrationusingIDfieldNondestructiveframearbitration第52頁/共62頁54CANArbitrationHigherpriorityframeswinarbitrationDataframeswinarbitrationoverremoteframesNodesalwaysmonitorthebusIfthereisadominantbitonthebus,andanodewantstosendarecessivebit,thenodelosesarbitration第53頁/共62頁551011001101110110010011LSBMSBNodewantstosendCANframewiththisID:OthernodeID:CANArbitrationExampl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年北京市國內(nèi)旅游合同范文
- 2025年包裝材料質(zhì)量檢測合同格式
- 2025年物流配送聯(lián)營策劃協(xié)議示范文本
- 2025年典當(dāng)行業(yè)務(wù)許可合同范本
- 2025年農(nóng)村合作社土地承包合同
- 2025年二手汽車交易過戶手續(xù)協(xié)議
- 2025年企業(yè)知識產(chǎn)權(quán)抵押貸款合同
- 2025年勞動合同解除與補償協(xié)議范本
- 2025年全球海運代理業(yè)務(wù)合同范本
- 2025年公園綠化養(yǎng)護工程協(xié)議
- 2025年電力鐵塔市場分析現(xiàn)狀
- GB 12158-2024防止靜電事故通用要求
- 《教育強國建設(shè)規(guī)劃綱要(2024-2035年)》全文
- 山東省濱州市2024-2025學(xué)年高二上學(xué)期期末地理試題( 含答案)
- 體育老師籃球說課
- 化學(xué)-江蘇省蘇州市2024-2025學(xué)年2025屆高三第一學(xué)期學(xué)業(yè)期末質(zhì)量陽光指標調(diào)研卷試題和答案
- 蛋雞生產(chǎn)飼養(yǎng)養(yǎng)殖培訓(xùn)課件
- 運用PDCA降低住院患者跌倒-墜床發(fā)生率
- 海底撈員工手冊
- 2024CSCO小細胞肺癌診療指南解讀
- 立春氣象與生活影響模板
評論
0/150
提交評論