CANVehicleDRIVERIMPLWord格式.docx
《CANVehicleDRIVERIMPLWord格式.docx》由会员分享,可在线阅读,更多相关《CANVehicleDRIVERIMPLWord格式.docx(6页珍藏版)》请在冰点文库上搜索。
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<
CANVehicle_DRIVER_SPEC.doc>
.
TheCANVehicledriverisimplementedbytricoreofTC1766
TheCANvehicledriveroffersameanstosendtheengineconditioninformationonCANbus..
ThepurgeisimplementedwithCANmoduleincludingCANinitializationfunction,CANvehiclefunctions.
1.2Reference
[1]CANVehicle_DRIVER_SPEC.doc
[2]
2Typedefinition
Type
Description
Range
3GlobalVariable
Varialbes
4FunctionDefinitions
4.1CAN_vInit
Syntax
voidCAN_vInit(void)
Parameters
none
Return
Notification
ThisfunctiondefinitionconfiguretheCANmodule
Indetailsthefunctionconfiguresthefollowing:
∙ConfigureCANmodule
∙
∙
Reentrancy
No
Remarks
4.2CCP_DAQPack
voidCCP_DAQPack(void)
None
TheprocessingpreparethedataofengineinformationforsendingonCANbus.
4.3CCP_DAQSend
voidCCP_DAQSend(void)
TheprocessingroutinesendthedatainturnsonCANbus
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
ODT2
12
CoolantT1
CoolantT2
AirT1
AirT2
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
Massage16
0x1C001100
SendtheinformationonCANbuswiththeCANID0x1C001100
Pin3.12
RXDCAN0
Pin3.13
TXDCAN0
6.2InterruptConfig
SRN
TOS
Priority
Name
7CompileEnvironment
CompileTool:
TaskingVX-ToolsetforTricorev2.2r3