車輛電子控制技術(shù):LIN總線_第1頁
車輛電子控制技術(shù):LIN總線_第2頁
車輛電子控制技術(shù):LIN總線_第3頁
車輛電子控制技術(shù):LIN總線_第4頁
車輛電子控制技術(shù):LIN總線_第5頁
已閱讀5頁,還剩73頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

LIN總線技術(shù)LIN(LocalInterconnectNetwork)局部互連網(wǎng)絡(luò)是一種將開關(guān)、顯示器、傳感器及執(zhí)行器等簡單控制設(shè)備連接起來的串行通信網(wǎng)絡(luò),主要用于實現(xiàn)汽車中的分布式電子系統(tǒng)控制。LIN總線的特點1、單主機,多從機結(jié)構(gòu)(沒有總線仲裁);2、基于普通UART/SCI接口的低成本硬件、低成本軟件或作為純狀態(tài)機;3、帶時間同步的多點廣播接收,從節(jié)點無需石英或陶瓷振蕩器:4、確定性的信號傳輸;5、低成本的單線實現(xiàn);6、速率可達20kbps;7、總線長度≤40m;8、保證信號傳輸?shù)难舆t時間;9、可選的數(shù)據(jù)場長度:0~8byte;10、配置的靈活性;11、數(shù)據(jù)校驗和的安全性和錯誤檢測;12、網(wǎng)絡(luò)中故障節(jié)點的檢測;13、使用最小成本的半導體元件(小尺寸,單芯片系統(tǒng));14、不需改變LIN從節(jié)點的硬件和軟件即可在網(wǎng)絡(luò)上增加節(jié)點;15、通常一個LIN網(wǎng)絡(luò)節(jié)點數(shù)小于16個;16、汽車電池供電。

CAN總線和LIN總線對比表WhyuseLIN?HeavyadoptionbyEuropeanOEMsIncreasedinterestfromUSOEMs,SAEOpenstandardnetworking(e.g.-LIN)means:Off-the-shelftools&componentsavailableNoneedforcustomtraining/supportofproprietaryprotocolsIncreasedinteroperabilityopensmarketopportunitiesStandardizationofInterfacesandComponentsFasterintroductionofnewtechnologiesGatewayCentralModuleMirrorX/YmovementHeaterDoorLockSuperLockLockSwitchPanalContactMonitorsWindowLiftMotor318PuddleLamp117StallDetection62PuddleFlasherECFoldMemory186843ComplexHarness(ManyVariations)Driver’sDoor(TraditionalWiring)μCμCSMALLGatewayCentralModuleMirrorPuddleFlasherECFoldMemoryX/YmovementHeaterDoorLockSuperLockLockPuddleLampSwitchPanalContactMonitorsWindowLiftMotorStallDetection33333DrasticHarnessSavings(onlyoneGatewaymoduleneeded)μCμCMechatronicPlug&PlayoptionDriver’sDoorwithLINLINHistory1998:FirstIdeas:LocalInterconnectNetworkaslowcostNetworkforin-Vehiclecommunicationwithlimitedrequirements,wellsuitedforMechatronicApplications.Smallteamofcompanies:VCT,Volvo,BMW,Volkswagen,Audi,DaimlerChryslerandMotorolaFastdecisionmaking,protocolbasedonexistingtechnology2000:LINConsortiumformedandofficiallyannounced2002:FirstCarswithLINentertheroad(DaimlerBenzSL,DaimlerBenzE-Class)September2002:1stInternationalLINConferenceSeptember2003:ReleaseofLIN2.0FirstexperiencewithLINflowsintonewSpecificationMainfocus:ReconfigurationofOff-The-ShelfnodesFebruary2004:LINSpecialMagazineMay2004:ConformanceTestforLIN2.0TheLINSpecificationSimpleCommunicationProtocolSignals(”publish/subscribe”Concept)nointerferenceinapplicationarchitecture

Efficient(lowProductionCost)RAM,CPUruntime,bandwidth

(inthisorder)SimpleIntegrationConfigurabilityIntegratedSignalGatewaybetweendifferentBusesReliabilityandTestabilityErrorsarenottolerablePredictabilityCostFactorsReducenumberofcablesSimpleandreliablephysicallayerSimpleandlowcostclockgenerationSimplicityofprotocolIndependenceofhardwareplatformUseofexistingcomponentsLowrequirementsforcommunicationspeedImplementationasstate-machine(inASIC‘s)ReducedrequireddieareaLINSpecification1.3UBPshistoricallyonlydefinetheprotocolandphysicallayerdetails.

-APIApplicationProgrammingInterface(SoftwareRec.Practice)

-CLDConfigurationLanguageDescription(ToolsInterfacing)

-PSProtocolSpecification+PhysicalLayerProtocolSoftwareTools

SAEJ2602andLINSpecification2.0

-PHYPhysicalLayerSpecificationSAEJ2602influenced

LIN2.0

-DIAGSIMPLIFIEDby

SAEJ2602:DIAGNOSTICS

areOPTIONALCONFIGURATIONisSIMPLER

-NCLNodeCapabilityLanguageSpecificationNO

SIGNIFICANT

CHANGES

-CLSConfigurationLanguageSpecificationNO

SIGNIFICANT

CHANGES

-APIApplicationProgrammingInterfaceNO

SIGNIFICANT

CHANGES

-PROTProtocolSpecificationNO

SIGNIFICANT

CHANGESSoftwareLayerHardwareLayerToolsECUOperatingSystemBusTransceiverApplicationCommunicationManagerVehiclePhysicalNetwork(thewire)LINAPISpecificationLINProtocolSpecificationLINPhysicalLayerSpec.DesignToolSuiteLINConfiguration

LanguageSignalDatabaseManager(SDM/L)BusAnalyzer(LINSpector)NetworkConfigurationGenerator(LCFG)LINPhysicalLayerSpec.LINConfigurationLanguageLINConformanceTestSpecificationLINSpecificationforDiagnosticsLINSystemDesignGuide(inPreparation)LINStandard-OverviewLIN1.2LIN1.1PL/PCLDLIN1.3LIN2.0RPAPILegend:PL/P –PhysicalLayer/ProtocolCLD –ConfigurationLanguageDescriptionRP –RecommendedPracticeAPI –ApplicationProgrammer’sInterfaceCT –ConformanceTestDC –DiagnosticsandConfigurationNCLD –NodeCapabilityLanguageDescriptionPL/PCLDRPAPIPL/PCLDRPAPIPLCLDAPICTNCLDApr.2000Nov.2000

Nov.2002

Sept.2003

CTProtocolnewmodDCnewnewLINSpecificationHistoryLIN-ProtocolSpecificationTheLINProtocolSpecificationdescribesthelogicaltransportofdatainaLINSystem.Thisincludes:FormatofdataframesHeaderDataChecksumSignalsandSignalTypesTypeofFramesSchedulingStatusManagementLIN-PhysicalLayerSpecificationTheLINPhysicalLayerSpecificationdescribestheelectricalrepresentationofthesignalsonthewire.Thisincludes:SignalshapeSignalvoltagesPhysicalpropertiesoftheelectricalinterfacesofthenodesAdditionallythePLSpecificationalsodescribestheclockrequirements.LINPhysicalLayerSingleWireConnection(GroundisReturnConductor)OpenDrain(WiredAND),ApprovedDominant/RecessiveConceptBasedonVbatt(noVoltageRegulatorrequired)VBAT8...18VGNDUART/SCIorSLICRxTxMaster: 1k

Slave: 30kLINBusControlledSlopeLINPhysicalLayerVBAT8...18VGNDRcessiveLogic‘1’DominantLogic‘0’60%40%BusVoltageTimeSCI/UARTorSLICRxTxElectronicControlUnitmaster:1k

slave:30kBuscontrolledslopeMaster: 2.2nFSlave: 220pFNote:TheLINspecificationreferstoVBATattheECUconnector.LINPhysicalInterfaceinPracticeEmbeddedLINNode(ECU)VSUPVSUPVBATRxTx30K1KGNDGNDLINInMasteronlyTransceiverICmaster:1k

slave:30k實例LINHeaderLINDatafield13bitBreak&delimiter0x55SynchMsgIDCloseupofAutomaticHeaderHandlingFrameSynchronizationand

BitRateSynchronizationFrameSynchronization(1)–NominalCaseApriori: +/-14%OscillatorDifferencefromthenominalfrequencyRecognitionofSynch-BreaksStopBitStartBitTotalLengthofaSCI/UARTFrames(10bittimes)Max.LengthofadominantPeriod

ofanormalUARTFrame(9bittimes)LengthofastandardUARTBREAKSymbol(10bittimes)Bydefinition,aUARTbreaksymbolisaminimumof10dominantbittimes.ItisseenbyareceivingUARTasa0x00datacharacterwithaframingerror.FrameSynchronisation(2)–FastSlaveClockApriori: +/-14%OscillatorDifferencefromthenominalfrequencyRecognitionofSynch-BreaksStopBitStartBitTotalLengthofaUARTFramesMax.LengthofadominantPeriod

ofanormalUARTFrame10TbitfromthevantagepointofaSlavewhichis14%fasterthanthenominalClockFrequency11-BitLimit(fastSlave)FrameSynchronisation(3)–SlowSlaveClock121111013Apriori: +/-14%OscillatorDifferencefromthenominalfrequencyRecognitionofSynch-BreaksStart-BitTotalLengthofaUARTFrameMax.LengthofadominantPeriod

ofanormalUARTFrameLengthofastandardUARTBREAKSignalBitRateSynchronizationSynchronizingisnecessaryinordertoensuredatatransfer.BitSamplingSynchronizingisnecessaryinordertoensuredatatransfer:StopBitStartBitDataaresampledintheexpectedmiddleofdatabit:UARTSampleClock(e.g.-StartBit)BitSampling–StandardUARTBitSampling(1)–ValiddetectionofSTOPStopBitStartBitSampleClockAfterrecognitionofLowlevelatthestartbit,thesamplecounterisstarted.Samplingtakesplaceattheparticular(subjective)middleofthebit.Importantisthatitissampledinavalidareaatthelastbitofabyte(stopbit).BitSampling(2)–EffectsonSlaveOscillatorAccuracyThevalidsampleareafortheSTOPbitisbetween138and152sampleclocks(with16oversampleclocks).Thiscorrelateswithamaximumalloweddifferenceofapproximately4%betweentransmitterandreceiver.Withinthistolerancerange,aSTOPbitwillalwaysbeproperlydetected.Thedifferencecanarisefromthetotaleffectsofclocktolerance,sampleerrorsandphysicallayererrorduetogroundshift.YoucanONLYproperlycommunicateifyoucancorrectlysampletheSTOPbitofeachbyteThereforethemaximumtolerancefortheclocksis+/-2%

(4%totaldifference)LINBaudRateRequirementsSync.StatusRequirementAccuracyConditionBeforesynchronizationBreakrecognition±14%(1)Masterclockaccuracyassumedtobewithin±0.5%ofnominalAftersynchronization(master-slave)LINmessagingwiththemaster±2%Relativetothemaster’sclockAftersynchronization(inc.slave-slave)LINmessagingwiththemasterandotherslaves±1%TheLINMessageFrameLINMessageFrame1to8datafieldschecksumMessageResponsesynchbreak13bitsynchfieldidentifierMessageHeaderFrame-

SynchronizationBit-time

SynchronizationMessageDescriptorMessageContentsLINMessageFrameSlaveMasterSYNCIDENTDATA1DATA2DATA1DATA2DATA3DATA4DATA1DATA2DATA3DATA8...CHECKSUMCHECKSUMCHECKSUMHeaderIn-FrameResponseSpaceResponseBREAKBreakFieldBREAKFieldBitTimeSYNC-DelimiterTSYNDELBREAKTSYNBRKSYNCFieldMessageResponseMessageHeaderSynchronizationFieldStopBitIdentifierSYNCFieldStartBit01234567MessageResponseMessageHeaderIdentifierFieldIdentifierBitsIdentifierFieldParityBitsMessageResponseMessageHeaderStartBitID00ID11ID22ID33ID44ID55P06P17StopbitIdentifierTheIdentifierlogicallydescribesthemeaningofthemessage.TheIdentifierisprotectedwith2Paritybits.Thereareupto64differentIdentifiersinaLINsystem.

60ofthemarefreelyavailabletoasystemdesigner.synchbreak13bitsynchfieldidentifiermessageheaderDataFieldInter-FrameSpaceIn-FrameResponseSpaceInterbyteSpaceSlaveResponseDataFieldsDataBytenChecksumFieldMessageResponseMessageHeaderDataByte0DataByte1…DataByteDataFieldByteField8DataBitsMessageResponseMessageHeaderStopBitStartBit0LSB1234567MSBChecksumFieldChecksumFieldMessageResponseMessageHeaderStopBitStartBit0LSB1234567MSB8ChecksumBitsLINSystemMessages

&SpecialFrames

CommandFrame8datafieldsClassicchecksumMessageResponsesynchbreak13bitsynchfieldidentifier$3CMessageHeaderExtendedFrame1tondatafieldsClassicchecksumMessageResponsesynchbreak13bitsynchfieldidentifier$3EMessageHeaderWake-UpFrameTWUSIGWAKE-UPSIGNALFRAMEoftheSlaveTaskWAKE-UPDelimiterBusinSleepModeSignalisIdleSYNCBREAKoftheMasterTaskLINMessageFrameTypes

UnconditionalFramesUnconditionalFramesarethestandardframesofaLINSystem.Withunconditionalframesanykindofdatacanbetransported.Unconditionalframeshaveanidentifierintherangeof0..0x3B.Theheaderisalwayssentbythemaster(mastertask)Publisherofanunconditionalframeshallalwaysprovidetheresponsetotheheader.Allsubscribertoanunconditionalframeshallreceivetheunconditionalframeandmakeitscontentsavailabletotheapplication.BasicLINCommunications–MASTERtoSLAVESlaveNodeSlaveNodeSlaveNodeSlaveNode(MastersendsDatatooneSlave)synchfieldidentifiersynchbreakdatabytedatabytechecksumMasterNodequartzIDRecognizedIDNOTrecognizedLINMasterTaskSlaveTask(transmitting)IgnoresdataReceivesdatasynchfieldidentifiersynchbreakBasicLINCommunications–MASTERtoSLAVESlaveNodeSlaveNodeSlaveNodeSlaveNode(Sendingmulticastmessages)databytedatabytechecksumMasterNodequartzLINMasterTaskSlaveTask(transmitting)IDRecognizedIDRecognizedReceivesdataReceivesdatadatabytedatabytechecksumsynchfieldidentifiersynchbreaksynchfieldidentifiersynchbreakdatabytedatabytechecksumBasicLINCommunications–SLAVEtoMASTER(PollingSLAVESfordata)SlaveNodeSlaveNodeSlaveNodeSlaveNodeMasterNodequartzIDRecognizedSlaverespondsaccordinglyIDNOTRecognizedNoresponseIDRecognizedSlaverespondsaccordinglyIDNOTRecognizedNoresponseLINMasterTaskSlaveTask(receiving)LINCommunication-DatafromSlavetoSlaveSlaveNodeASlaveTaskTransmissionSlaveTaskReceivingSlaveNodeBSlaveTaskTransmissionSlaveTaskReceivingMasterNodeLINMasterTaskSlaveTaskTransmissionSlaveTaskReceivingquartzEventTriggeredFrameInordertominimizetimeforinterrogatingeventsensors,amethodforinterrogatingmultiplenodeshasbeendeveloped:Themastersendsoutaheader,andaresponseisplacedonthebusonlyifachangeinthestate(event)hashappened.Threecasescantakeplace:Noeventtookplace:Noresponse1Nodesignalschange:ResponseMorethanoneNodesignalchange:CollisionSpecialLINCommunications–EventTriggeredFramesCASE1–NORESPONSE(PollingSLAVESfordata)synchfieldidentifiersynchbreakSlaveNodeSlaveNodeSlaveNodeSlaveNodeMasterNodequartzIDRecognizedNoEvent

→NoresponseLINMasterTaskIDRecognizedNoEvent

→NoresponseSpecialLINCommunications–EventTriggeredFrames

CASE2–SINGLENODERESPONSE(PollingSLAVESfordata)databytedatabytechecksumsynchfieldidentifiersynchbreakSlaveNodeSlaveNodeSlaveNodeSlaveNodeMasterNodequartzLINMasterTaskSlaveTask(receiving)IDRecognizedNoEvent

→NoresponseIDRecognizedEventoccured

→ResponseSpecialLINCommunications–EventTriggeredFrames

CASE3–MULTIPLENODERESPONSE(PollingSLAVESfordata)SlaveNodeSlaveNodeSlaveNodeSlaveNodeMasterNodequartzIDRecognizedSlaverespondsaccordinglyLINMasterTaskSlaveTask(receiving)databytedatabytechecksumdatabytedatabytechecksumsynchfieldidentifiersynchbreakIDRecognizedEventoccured

→ResponseSpecialLINCommunications–EventTriggeredFrames

CASE3–RESOLVINGMULTIPLENODERESPONSES(PollingSLAVESfordata)SlaveNodeSlaveNodeSlaveNodeSlaveNodeMasterNodequartzIDRecognizedSlaverespondsaccordinglyIDNOTRecognizedNoresponseIDRecognizedSlaverespondsaccordinglyIDNOTRecognizedNoresponseLINMasterTaskSlaveTask(receiving)databytedatabytechecksumdatabytedatabytechecksumsynchfieldidentifiersynchbreaksynchfieldidentifiersynchbreakLINIdentifierUsageMapSimpletabletoshowIDassignments:0x00-0x3B -Userspace0x3C -CommandMessage0x3D -ResponseMessage0x3E -UserDefinedsystemmessages0x3F -ReservedforfutureLINusage–mustnotbeused!InLIN1.xonlyclassicalchecksumisused(Checksumoverdatabytesonly).InLIN2.0messageswithIDsfrom0x00to0x3BarealwaysassociatedwiththeenhancedChecksum(Checksumoveridentifieranddatabytes).MessageswithIdentifiers0x3Ctrough0x3EalwaysusetheclassicalChecksum.DiagnosticFramesInLIN1.3norestrictionsfordiagnosticandconfigurationmessageshavebeendefined.

Theusageisopenforusers.InLIN2.0DiagnosticandConfigurationmessagesmakeuseof0x3Cand0x3Dmessages.Configurationmessages:LIN2.0defines(re-)configurationmessages,whichusethediagnosticmessageframeswiththeIDs0x3C(forcommandmessages)and0x3D(forresponsemessages).ThediagnosticmessageframeformatarederivedfromISO15675StandardDiagnosticFrameFormatNADPCISIDD1D2D3D4D5NADPCIRSIDD1D2D3D4D5TheDiagnosticFrameFormatisbasedonISO15765.Thedatastructureisasfollows(DataBytes1..8oftheLINFrame):Request(ID=0x3C):Response(ID=0x3D):ADiagnosticFrameisalwaysassociatedwiththeclassicchecksum

(checksumoverthedatafieldsonly).NAD–NodeAddress–physicalidentificationofanodeinthesystemPCI–ProtocolControlInformationSID–ServiceIdentifier–specifiesthecontentsoftherequestRSID–ResponseServiceIdentifier–specifiesthecontentsoftheresponseUserDefined&ReservedFramesUserDefinedMessages(ID=0x3E):Userdefinedframescancarryanykindofinformation.Theformatandlengthisdefinedbytheuser.Thistypeofframemaybeusede.g.fordownloadofdataoruploadofdiagnosticinformation.Reservedframes(ID=0x3F)ReservedframesmustnotbeusedinaLIN2.0cluster.Theidentifierisreservedforfutureuse.AslavenodecomplianttoLIN2.0mustremainsilentuponreceptionoftheIdentifier0x3F

LINMessageFrameBudgetInordertoensurethatsignalsarriveattheirdestinationwithintheirtimelimit,thebehaviorofthesystemmustbepredictable.Thereforethemessageframeshavetobecompletedwithinaspecifictimeframe.LINdefines“messageslots“inwhicheachmessageistransported.Thisallowstopredictwhenamessageisbeingsent.Themessageslothasadefinedminimumlengthof140%ofthetheoreticalminimumlengthoftheframe.Theslotlengthcalculatesasfollows:(lHeader+nData*lByte+lChksum)*140%=(44+nData*10)*1.4TBitExample:A2-bytemessageslothasaminimumlengthof90bit-times.

An8-bytemessageslothasaminimumlengthof174bit-timesProtocolSoftwareTools

SAEJ2602andLINSpecification2.0

-PHYPhysicalLayerSpecificationSAEJ2602influenced

LIN2.0

-DIAGSIMPLIFIEDby

SAEJ2602:DIAGNOSTICS

areOPTIONALCONFIGURATIONisSIMPLER

-NCLNodeCapabilityLanguageSpecification

-CLSConfigurationLanguageSpecification

-APIApplicationProgrammingInterface

-PROTProtocolSpecificationLIN-ConfigurationLanguageDescriptionTheLINConfigurationFilecontainsallimportantinformationfortheoperationofthenetwork:Signals,LatencyTimes,CycleTimes,Nodes…Servesasdevelopmentinterfacebetweenthesinglenodes.InputFilefor:LINApplicationGeneratorLINEmulatorLINAnalyzerLINdescriptionfile

LIN_description_file; //example:mirrornetworkLIN_protocol_version= "1.1";LIN_language_version= "1.1";LIN_speed= 9.6kbps;Nodes {Master:CBCM,timebase5ms,jitter0.1ms; Slave: MR_DR,MR_PS,MR_RF;}Frames {frame_name,frame_id,published_by{

{signal_name,signaloffset}}Signals {signal_name:signal_size,init_value, published_by,subscribed_by}Schedule_tables {schedule_table_name{ frame_namedelayframe_time}Signal_grou

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論