CSGDRIVERIMPLWord格式.docx
《CSGDRIVERIMPLWord格式.docx》由会员分享,可在线阅读,更多相关《CSGDRIVERIMPLWord格式.docx(9页珍藏版)》请在冰豆网上搜索。
1.2Acronymsandabbreviation4
1.3Reference4
1.4Declaration4
2TypeDefinition5
3GlobalVariable6
3.1Channel6
4DriverFunction7
4.1CSG_Init()7
4.2CSG_Channel_Configt()7
4.3CSG_SetPulse_TT_Tb_Te()8
4.4CSG_SetPulse_TT_Tb_Te_MAE()8
4.5CSG_SetPulse_AT_Ae_PL_MAE()9
4.6CSG_CSG_SetPulse_AA_Ae_PL()9
4.7CSG_SetPulse_AT_Ae_PL_MAE()10
4.8CSG_SetPulse_AT_Ae_PL_MAE()10
5PinConfiguration11
5.1Output11
6CompileEnvironment12
7Note12
1Introduction
1.1Overview
Managingacombustionenginemeansgenerationoftheignitionandinjectionsignalsbasedonthecurrentenvironmentalconditionsoftheengine(e.g.,engineposition,speed,acceleration,temperature,airmassflow,exhaustemissions,etc.).
ThepurposeoftheComplexSignalGenerationDriveristodeliverproducecomplexsignal(ignitionandinjectionsignals)neededfortheEngineManagementapplication.accordingtotheparametercalculatedbytheECU.Thisapplicationisconceivedforafourstrokesengine.
ThisdocumentdescribeshowtousetheComplexSignalGenerationDriver.
1.2Acronymsandabbreviation
Acronym
Description
ECU
EngineControlUnit
EP
EnginePosition
EP_Driver
EnginePositionDriver
CSG
ComplexSignalGeneration
1.3Reference
[1]Enginepositiondriverspecificationdocument.doc.
[2]ComplexSignalGenerationspecificationdocument.doc.
1.4Declaration
MostoftheexpressionmethodandsomecontentsarereferstoEnginepositiondriverspecificationdocumentofInfineon.Ifthereareanyintrusionofcopyright,pleasestopusethisdocumentimmediatelyandtellus.
2TypeDefinition
Type
Range
t_CSG_Boolean
UsedastheBooleantype
TRUE
FALSE
Otherstypeusedinthisdocumentrefesto“Complexsignalgenerationspecificationdocument”
3GlobalVariable
Thischapterdescribestheglobalvariablewhichcanbecalledinouterplace.
3.1Channel
Thisisastruct,inchargeofstoringthebasicconfigureinformationofthecorrespondingchannel.
MembersofSignalConsistencyModule
IsConfig
Refersto“Enginepositiondriverspecificationdocument”
IsEnable
IsStart
PulseType
t_CSG_PulseType
ActiveLevel
t_CSG_Level
GTCA
Uint32
GTCB
Pin
t_CSG_Pin
4DriverFunction
Thischapterdescribesthedriverfunctionwhichcanbecalledinouterplace.
4.1CSG_Init()
Function
t_StatusCSG_Init(void)
ThisistheinitializationfunctionoftheEngineDriverfunctionlibrary.ItisassumedthattheSFRsusedbythislibraryareintheirresetstate.
Parameters
None
RetrunValue
t_Statusthestatusoftheexecutionofthefunction
Note
4.2CSG_Channel_Configt()
t_CSG_PulseTypeCSG_Channel_Config
(
unsignedintChannelId,
t_CSG_PulseTypePulseType,
t_CSG_LevelActiveLevel,
t_CSG_Status*RetrunStatus
)
ThisfunctionconfigurestheCSGchannelsbeforeusingthischannel
unsignedintChannelId,
t_CSG_PulseTypePulseType,
t_CSG_LevelActiveLevel,
t_CSG_Status*RetrunStatus
4.3CSG_SetPulse_TT_Tb_Te()
t_CSG_StatusCSG_SetPulse_TT_Tb_Te
(
t_CSG_TimeTimeBegin,
t_CSG_TimeTimeEnd
)
Thisfunctiongivestarttoaplusgeneration,andconfiguretheparameterstructusedbythiskindofpulse
ChannelIdspecifywhichchanneltobestartedTimeBeginthebeginpointofpulsereferringglobaltime
TimeEndtheendpointofpulsereferringglobaltime
t_CSG_StatusThepresentpulsekindofthechannelwithChannelId
4.4CSG_SetPulse_TT_Tb_Te_MAE()
t_CSG_StatusCSG_SetPulse_TT_Tb_Te_MAE
t_CSG_TimeTimeEnd,
t_CSG_AngleAngleMax
AngleMaxthemaximumendpointofpulsereferringglobalangle
4.5CSG_SetPulse_AT_Ae_PL_MAE()
t_CSG_StatusCSG_SetPulse_AA_Ab_Ae
t_CSG_AngleAngleBegin,
t_CSG_AngleAngleEnd
ChannelIdspecifywhichchanneltobestartedAngleBeginthebeginepointofpulsereferringglobalangle
AngleEndtheendpointofpulsereferringglobalangle
4.6CSG_CSG_SetPulse_AA_Ae_PL()
t_CSG_StatusCSG_SetPulse_AA_Ae_PL
t_CSG_AngleAngleEnd,
t_CSG_TimePulseLength
ChannelIdspecifywhichchanneltobestartedAngleEndtheendpointofpulsereferringglobalangle
PulseLengththepluslengthtobegenerated,unitsus
4.7CSG_SetPulse_AT_Ae_PL_MAE()
t_CSG_StatusCSG_SetPulse_AT_Ab_PL_MAE
t_CSG_TimePulseLength,
AngleMaxthemaxangleendreferringtoglobalangle
4.8CSG_SetPulse_AT_Ae_PL_MAE()
t_CSG_StatusCSG_SetPulse_AT_Ae_PL_MAE
t_CSG_TimePulseLength,
5PinConfiguration
ThepinusedinCSGDriver
5.1Output
Pinnumber
P0.8
Output
OutputofCSGchannel0
P0.9
OutputofCSGchannel1
P0.11
OutputofCSGchannel2
P0.12
OutputofCSGchannel3
P1.0
OutputofCSGchannel4
P1.3
OutputofCSGchannel5
P1.4
OutputofCSGchannel6
P01.5
OutputofCSGchannel7
6CompileEnvironment
CompileTool:
TaskingforTricore
ConfigureoftheTasking:
enable“use32-Bitintegerforenumeration”
Path:
Project→ProjectOption→CCompiler→Language
7Note
Thisisthefirstdraftofthisdocument.Maybetherearesomeerrorandmistake.And,theroutinecodealsoneedtoimprove.ThemonitorroutinefortheCSGchannelisnotimplementedinthisversionofroutine.