CAN总线物理层.docx

上传人:b****6 文档编号:7567475 上传时间:2023-01-25 格式:DOCX 页数:9 大小:37.75KB
下载 相关 举报
CAN总线物理层.docx_第1页
第1页 / 共9页
CAN总线物理层.docx_第2页
第2页 / 共9页
CAN总线物理层.docx_第3页
第3页 / 共9页
CAN总线物理层.docx_第4页
第4页 / 共9页
CAN总线物理层.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

CAN总线物理层.docx

《CAN总线物理层.docx》由会员分享,可在线阅读,更多相关《CAN总线物理层.docx(9页珍藏版)》请在冰豆网上搜索。

CAN总线物理层.docx

CAN总线物理层

CANPhysicalLayer

TheControllerAreaNetwork(CAN)protocoldefinesthedatalinklayerandpartofthephysicallayerintheOSImodel,whichconsistsofsevenlayers.TheInternationalStandardsOrganization(ISO)definedastandard,whichincorporatestheCANspecificationsaswellasapartofphysicallayer:

thephysicalsignaling,whichcomprisesbitencodinganddecoding(NonReturntoZero,NRZ)aswellasbit-timingandsynchronization.

Bitencoding

NRZcomparedwithManchesterbitrepresentation

InthechosenNonReturntoZero(NRZ)bitcodingthesignallevelremainsconstantoverthebittimeandthusjustonetimeslotisrequiredfortherepresentationofabit(othermethodsofbitencodingaree.g.ManchesterorPulse-width-modulation).Thesignallevelcanremainconstantoveralongerperiodoftime;thereforemeasuresmustbetakentoensurethatthemaximumpermissibleintervalbetweentwosignaledgesisnotexceeded.Thisisimportantforsynchronizationpurposes.Bitstuffingisappliedbyinsertingacomplementarybitafterfivebitsofequalvalue.Ofcoursethereceiverhastoun-stuffthestuff-bitssothattheoriginaldatacontentisprocessed.

 Bit-timingandsynchronization

Nominalbit-time

Onthebit-level(OSIlayer1,physicallayer)CANusessynchronousbittransmission.Thisenhancesthetransmittingcapacitybutalsomeansthatasophisticatedmethodofbitsynchronizationisrequired.Whilebitsynchronizationinacharacter-orientedtransmission(asynchronous)isperformeduponthereceptionofthestartbitavailablewitheachcharacter,asynchronoustransmissionprotocolthereisjustonestartbitavailableatthebeginningofaframe.Toenablethereceivertocorrectlyreadthemessages,continuousresynchronizationisrequired.Phasebuffersegmentsarethereforeinsertedbeforeandafterthenominalsamplepointwithinabitinterval.

TheCANprotocolregulatesbusaccessbybit-wisearbitration.Thesignalpropagationfromsendertoreceiverandbacktothesendermustbecompletedwithinonebit-time.Forsynchronizationpurposesafurthertimesegment,thepropagationdelaysegment,isneededinadditiontothetimereservedforsynchronization,thephasebuffersegments.Thepropagationdelaysegmenttakesintoaccountthesignalpropagationonthebusaswellassignaldelayscausedbytransmittingandreceivingnodes.

Twotypesofsynchronizationaredistinguished:

hardsynchronizationatthestartofaframeandresynchronizationwithinaframe.

∙Afterahardsynchronizationthebittimeisrestartedattheendofthesyncsegment.Thereforetheedge,whichcausedthehardsynchronization,lieswithinthesyncsegmentoftherestartedbittime.

∙Resynchronizationshortensorlengthensthebittimesothatthesamplepointisshiftedaccordingtothedetectededge

Thedevicedesignermayprogramthebit-timingparametersintheCANcontrollerbymeansoftheappropriateregisters.

Interdependencyofdatarateandbuslength

Dependingonthesizeofthepropagationdelaysegmentthemaximumpossiblebuslengthataspecificdatarate(orthemaximumpossibledatarateataspecificbuslength)canbedetermined.Thesignalpropagationisdeterminedbythetwonodeswithinthesystemthatarefarthestapartfromeachother.Itisthetimethatittakesasignaltotravelfromonenodetotheonefarthestapart(takingintoaccountthedelaycausedbythetransmittingandreceivingnode),synchronizationandthesignalfromthesecondnodetotravelbacktothefirstone.Onlythencanthefirstnodedecidewhetheritsownsignallevel(recessiveinthiscase)istheactuallevelonthebusorwhetherithasbeenreplacedbythedominantlevelbyanothernode.Thisfactisimportantforbusarbitration.

Somemoderntransceiverssupportnolowdatarates.Thereforeonacquisitionoftransceiversthemaximalrequirednetworklengthmustbeconsidered.

Physicalmedia

Thisclauseismostinterestingforsystemdesigners.

ThebasisfortransmittingCANmessagesandforcompetingforbusaccessistheabilitytorepresentadominantandarecessivebitvalue.Thisispossibleforelectricalandopticalmediasofar.Alsopowerlineandwirelesstransmissionispossible.

ForelectricalmediathedifferentialoutputbusvoltagesaredefinedinISO11898-2andISO11898-3,inSAEJ2411,andISO11992(seebelow).

Withopticalmediatherecessivelevelisrepresentedby"dark"andthedominantlevelby"light".

ThephysicalmediamostcommonlyusedtoimplementCANnetworksisadifferentiallydrivenpairofwiredwithcommonreturn.Forvehiclebodyelectronicssinglewirebuslinesarealsoused.SomeeffortshavebeenmadetodevelopasolutionforthetransmissionofCANsignalsonthesamelineasthepowersupply.

Theparametersoftheelectricalmediumbecomeimportantwhenthebuslengthisincreased.Signalpropagation,thelineresistanceandwirecrosssectionsarefactorswhendimensioninganetwork.Inordertoachievethehighestpossiblebitrateatagivenlength,ahighsignalspeedisrequired.Forlongbuslinesthevoltagedropsoverthelengthofthebusline.Thewirecrosssectionnecessaryiscalculatedbythepermissiblevoltagedropofthesignallevelbetweenthetwonodesfarthestapartinthesystemandtheoverallinputresistanceofallconnectedreceivers.Thepermissiblevoltagedropmustbesuchthatthesignallevelcanbereliablyinterpretedatanyreceivingnode.

Theconsiderationofelectromagneticcompatibilityandchoiceofcablesandconnectorsbelongsalsotothetasksofasystemintegrator.

 

assumedlinelength100m

Specificsignalpropagationtime(ns/m)

Maximumbitrate(kbit/s)

5.0

80

5.5

73

6.0

67

6.5

62

7.0

58

Networktopology

Thisclauseismostinterestingforsystemdesigners.

Electricalsignalsonthebusarereflectedattheendsoftheelectricallineunlessmeasuresagainstthathavebeentaken.Forthenodetoreadthebuslevelcorrectlyitisimportantthatsignalreflectionsareavoided.Thisisdonebyterminatingthebuslinewithaterminationresistoratbothendsofthebusandbyavoidingunnecessarilylongstubslinesofthebus.Thehighestpossibleproductoftransmissionrateandbuslengthlineisachievedbykeepingascloseaspossibletoasinglelinestructureandbyterminatingbothendsoftheline.Specificrecommendationsforthiscanbefoundintheaccordingstandards(i.e.ISO11898-2and-3).

Itispossibletoovercomethelimitationsofthebasiclinetopologybyusingrepeaters,bridgesorgateways.Arepeatertransfersanelectricalsignalfromonephysicalbussegmenttoanothersegment.Thesignalisonlyrefreshedandtherepeatercanberegardedasapassivecomponentcomparabletoacable.Therepeaterdividesabusintotwophysicallyindependentsegments.Thiscausesanadditionalsignalpropagationtime.However,itislogicallyjustonebussystem.

Abridgeconnectstwologicallyseparatednetworksonthedatalinklayer(OSIlayer2).ThisissothattheCANidentifiersareuniqueineachofthetwobussystems.Bridgesimplementastoragefunctionandcanforwardmessagesorpartsthereofinanindependenttime-delayedtransmission.Bridgesdifferfromrepeaterssincetheyforwardmessages,whicharenotlocal,whilerepeatersforwardallelectricalsignalsincludingtheCANidentifier.

Agatewayprovidestheconnectionofnetworkswithdifferenthigher-layerprotocols.Itthereforeperformsthetranslationofprotocoldatabetweentwocommunicationsystems.Thistranslationtakesplaceontheapplicationlayer(OSIlayer7).

Busaccess

TheconnectionbetweenaCANcontrollerchipandatwo-wiredifferentialbusavarietyofCANtransceiverchipsaccordingtodifferentphysicallayerstandardsareavailable(seebelowISO11898-2and-3,etc.).

Thisinterfacebasicallyconsistsofatransmittingamplifierandareceivingamplifier(transceiver=transmitandreceive).Asidefromtheadaptationofthesignalrepresentationbetweenchipandbusmediumthetransceiverhastomeetaseriesofadditionalrequirements.Asatransmitteritprovidessufficientdriveroutputcapacityandprotectstheon-controller-chipdriveragainstoverloading.Italsoreduceselectromagneticradiation.AsareceivertheCANtransceiverprovidesadefinedrecessivesignallevelandprotectstheon-controller-chipinputcomparatoragainstover-voltagesonthebuslines.ItalsoextendsthecommonmoderangeoftheinputcomparatorintheCANcontrollerandprovidessufficientinputsensitivity.Furthermoreitdetectsbuserrorssuchaslinebreakage,shortcircuits,shortstoground,etc.AfurtherfunctionofthetransceivercanalsobethegalvanicisolationofaCANnodeandthebusline.

Physicallayerstandards

ISO11898-2highspeed

ISO11898-2isthemostusedphysicallayerstandardforCANnetworks.Itdescribesthebusaccessunit(implementedasCANhigh-speedtransceiver)functionsaswellassomemedium-dependentinterfacefeatures.

Inthisstandardthedatarateisdefinedupto1Mbit/swithatheoreticallypossiblebuslengthof40mat1Mbit/s.Thehigh-speedstandardspecifiesatwo-wiredifferentialbuswherebythenumberofnodesislimitedbytheelectricalbusload.Thecharacteristiclineimpedanceis120Ohm,thecommonmodevoltagerangesfrom-2VonCAN_Lto+7VonCAN_H.Thenominalspecificpropagationdelayofthetwo-wirebuslineisspecifiedat5ns/m.Allthesefiguresarevalidonlyfora1Mbit/stransferrateandamaximumnetworklengthof40m.

Inordertoachievephysicalcompatibilityallnodesinthenetworkmustusethesameorasimilarbit-timing.ForautomotiveapplicationstheSAEpublishedtheSAEJ2284specification.Forindustrialandothernon-automotiveappl

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教学研究 > 教学计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1