AN3333 XGATE Library Signal Gateway Implementing C

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

FreescaleSemiconductorApplicationNoteDocumentNumber:AN3333Rev.0,11/2006Contents©FreescaleSemiconductor,Inc.,2006.Allrightsreserved.1IntroductionTheXGATEsignalgatewaypackageisacollectionofheaderandsourcefilesintheCprogramminglanguage,enablingyoutocreateaCANandLINsignallevelautomotivebodygateway.Thegatewaystructuredetailedinthisapplicationnoteisflexibleenoughtoallowextensionsand/ormodificationstosatisfyaparticularenvironment’srequirements.2SignalGatewayTheoryNoindustry-widestandardcurrentlyexistsforautomotivebodygateways.Eachvehiclemanufacturermaintainshisorherownsetofevolvingspecificationsofthetrafficagatewayhandles.Thissectionoutlinesonesetofspecifications.Thesespecificationsarenotbasedonrequirementssetbyanyspecificvehiclemanufacturer.TogaininsightintotheXGATEperformance,thissetrepresentsmeaningfulbasicbodygatewayrequirementsenablingareal-worldgatewaytobeimplemented.1Introduction...................................12SignalGatewayTheory..........................12.1ThePurposeofGateways....................22.2DataRepresentation........................32.3GatewayDataFlow.........................43GatewayImplementation.........................73.1DataStructures............................73.2Algorithms...............................143.3LimitationsofThisGatewayImplementation.....234PerformanceAnalysis..........................234.1XGATELoad.............................234.2RequiredMemorySize.....................325GeneratingtheDescriptors......................345.1GeneratedFiles...........................345.2NodeDataWorksheet......................355.3RxFramesWorksheet......................355.4TxFrameWorksheet.......................375.5GeneratingtheSourceFiles.................386References..................................38XGATELibrary:SignalGatewayImplementingCANandLINSignalLevelGatewayby:DanielMalikMCDApplicationsEastKilbride,ScotlandXGATELibrary:SignalGateway,Rev.0SignalGatewayTheoryFreescaleSemiconductor22.1ThePurposeofGatewaysInthepastdecade,theautomotiveindustryhasseenincreaseddemandforsafetyfeatures,increasedpressuretoreduceenvironmentaleffectscausedbyde-processingvehicles,andincreasedexpectationsformoderntechnology(suchasnavigationsystemsormobilecommunications)tobecomestandardeveninlower-endmodels.Thesechangesarepartiallycausedandpartiallyenabledbythedecreasingcostofsemiconductorsolutionsofferedtoautomotivemanufacturers.Keyautomotivetechnologieshavedevelopedfromnetworkedsystemstodistributedsystems.Thedifferentin-vehiclesystemsusedifferentnetworkingtechnologies;however,thetraditionalcontrollerareanetwork(CAN)developedbyRobertBoschGmbHin1986isstillattheheartofmany.Theneedforcost-optimized,low-speedbuseshasledtothedevelopmentofalocalinterconnectnetwork(LIN)typicallyusedforseatmanagementanddoorsub-systems(locks,windows,mirrors,etc.).Independentbuses(asopposedtoasinglebusinterconnectingallsystemsinthewholevehicle)areusedinindividualvehiclesystemsforseveralreasons:•Applicationrequirementsmayresultindifferentcommunicationspeedsfordifferentsystems(500kbpsforpowertrainvs.125kbpsfordashboard).•Thephysicallayerofthebusesmaynotbecompatible(LINvs.CAN,low-speedCANvs.high-speedCAN,etc.).•Physicalseparationofthebusesmayberequiredforsecuritypurposes.•Systemssharinglittleinformationmayusephysicallyseparatebusestolowertheamountofunnecessarytraffic.Thegatewayapplication’spurposeistotransferinformationamongthevehicle’sdifferentbusestoensureallsystemsreceivetherequiredinformationinatimelymanner.Forexample,thedashboardisdesignedtodisplay(amongotherinformation)thecurrenttemperatureoftheenginecoolant.Itisthegateway’sresponsibilitytoensurethetemperatureinformationpresentonthepowertrainbusisre-transmittedonthebodybus(seeFigure1).Figure1.GatewayApplicationExampleCANPHYHCS12XXGATECANPHYCANPHYCANPHYCANPHYLSCANBodyHSCANTelematicsHSCANPowertrainHS/LSCANChassisHSCANDiagnosticLINPHYLINPHYDoormodules-rightsideDoormodules-leftsideDirectloadsSwitchpanelFrontlightingSteeringcolumnSwitchpanelsWipersPowerseatsRainsensorandsunroofLINPHYLINPHYSignalGatewayTheoryXGATELibrary:SignalGateway,Rev.0FreescaleSemiconductor32.2DataRepresentationToassessthetaskofthegatewayapplication,theusermustunderstandhowinformationisrepresentedonthedifferentbuses.2.2.1MessageGatewayingThecommonpropertyofLINandCANframesisthattheycantransportuptoeightdatabytes.Thesimplesttaskforthegatewayistoreceiveaframeononebusthenre-senditonanotherbusinitsentirety.Thisprocessisusuallyreferredtoasmessagegatewayingoras1:1frameforwardingandistypicallyusedfordiagnosticpurposes.Indiagnosticmode,thegatewayextractsasetofframesfromthedifferentbusestowhichitisconnected.Theseframesarethenre-transmittedonthediagnosticbustowhichthegaragediagnosticequipmentisconnected.Thegatewayalsoreceivesframesfromthediagnosticequipmentandforwardsthemtothedifferentvehiclesystems(foradjustmentofengineparameters,firmwareupgrade,etc.).2.2.2SignalsMessagegatewayingisefficient;however,itcanbeusedonlyifthedestinationapplicationcanprocesstheoriginalframewithoutanytransformation.Anotheraspectisthebusload.Apieceofin

1 / 40
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功