CANVehicleDRIVERIMPL.docx
《CANVehicleDRIVERIMPL.docx》由会员分享,可在线阅读,更多相关《CANVehicleDRIVERIMPL.docx(6页珍藏版)》请在冰豆网上搜索。
![CANVehicleDRIVERIMPL.docx](https://file1.bdocx.com/fileroot1/2023-3/28/4ad75326-5838-437a-a5de-136396e75295/4ad75326-5838-437a-a5de-136396e752951.gif)
CANVehicleDRIVERIMPL
CONFIDENTIAL
TJU—IFXAutomotiveElectronicJointLaboratory
StateKeyLaboratoryofEngines
TianJinUniversity,China
GEMS–K1
CANVehicledriverimplementationdocument
Revisionhistory
Version
By
Modifications
V0.1,20thNov.2008
Hoangchao.Zhang
Creation
Summary
Revisionhistory2
Summary3
1Introduction4
1.1Overview4
1.2Reference4
2Typedefinition5
3GlobalVariable6
4FunctionDefinitions7
4.1CAN_vInit7
4.2CCP_DAQPack7
4.3CCP_DAQSend8
5CANNodCofig9
5.1CanbusBandRate9
5.2CanMessage9
6ResourcesConfiguration10
6.1PeriperalConfig10
6.2InterruptConfig10
7CompileEnvironment10
1Introduction
1.1Overview
ThisdocumentdescribestheimplementationoftheCANVehicledrivertobedevelopedintheframeoftheGEMS-K1project.ItisbasedontheCANVehiclespecificationdocument.
TheCANVehicledriverisimplementedbytricoreofTC1766
TheCANvehicledriveroffersameanstosendtheengineconditioninformationonCANbus..
ThepurgeisimplementedwithCANmoduleincludingCANinitializationfunction,CANvehiclefunctions.
1.2Reference
[1]CANVehicle_DRIVER_SPEC.doc
[2]
2Typedefinition
Type
Description
Range
3GlobalVariable
Varialbes
Type
Description
4FunctionDefinitions
4.1CAN_vInit
Syntax
voidCAN_vInit(void)
Parameters
none
Return
none
Notification
Description
ThisfunctiondefinitionconfiguretheCANmodule
Indetailsthefunctionconfiguresthefollowing:
∙ConfigureCANmodule
∙
∙
Reentrancy
No
Remarks
4.2CCP_DAQPack
Syntax
voidCCP_DAQPack(void)
Parameters
None
Return
None
Notification
Description
TheprocessingpreparethedataofengineinformationforsendingonCANbus.
Reentrancy
No
Remarks
4.3CCP_DAQSend
Syntax
voidCCP_DAQSend(void)
Parameters
None
Return
None
Notification
Description
TheprocessingroutinesendthedatainturnsonCANbus
Reentrancy
No
Remarks
5CANBusConfiguration
CanbusBandRate
ConfigurationoftheCANNodeBaudRateis500Kkbaud.
Pin3.12usedasRXDCAN0
Pin3.13usedasTXDCAN0
CanMessage
PID
1
2
3
4
5
6
7
ODT0
10
Speed1
Speed2
ETC1
ETC2
Padl1
Padl2
ODT1
11
Map1
Map2
AirP1
AirP2
VVT_Phase
VVT_Phase
ODT2
12
CoolantT1
CoolantT2
AirT1
AirT2
OBD_FlsCde
OBD_FlsCde
ODT3
13
Lambda1
Lambda2
Knock1
Knock2
A/C_Pswitch
A/C_Switch
ODT4
14
Battery1
Battery2
Senser5v1
Senser5v2
ODT5
15
ETC_Out1
ETC_Out2
InjPW1
InjPW2
IgnAdv1
IgnAdv2
ODT*meansdifferentCANmessage
1,2-7meanstheCANbytesintheCANmessage
**1,s**2meansaintegratedvariableinCANmessage.Forexample:
the16bitsofSpeed1andspeed2contentsthevariableofSpeedinshortformat.
6ResourcesConfiguration
6.1PeriperalConfig
Source
ID
Description
Massage16
0x1C001100
SendtheinformationonCANbuswiththeCANID0x1C001100
Pin3.12
RXDCAN0
Pin3.13
TXDCAN0
6.2InterruptConfig
Source
SRN
TOS
Priority
Name
Description
7CompileEnvironment
CompileTool:
TaskingVX-ToolsetforTricorev2.2r3