WatchDogDRIVERIMPL.docx
《WatchDogDRIVERIMPL.docx》由会员分享,可在线阅读,更多相关《WatchDogDRIVERIMPL.docx(7页珍藏版)》请在冰点文库上搜索。
![WatchDogDRIVERIMPL.docx](https://file1.bingdoc.com/fileroot1/2023-5/1/50368203-5ff4-4e00-b537-29261a31d21f/50368203-5ff4-4e00-b537-29261a31d21f1.gif)
WatchDogDRIVERIMPL
CONFIDENTIAL
TJU—IFXAutomotiveElectronicJointLaboratory
StateKeyLaboratoryofEngines
TianJinUniversity,China
GEMS–K1
Watchdogdriverimplementationdocument
Revisionhistory
Version
By
Modifications
V0.1,6thNovember2008
Hoangchao.Zhang
Creation
Summary
Revisionhistory2
Summary3
1Introduction4
1.1Overview4
1.2Reference5
2.Typedefinition6
3GlobalVariable7
4FunctionDefinitions8
4.1SCU_vInit8
4.2SCU_vServiceWDT9
4.3SCU_vDisableWDT9
4.4SCU_vEnableWDT9
5ResourcesConfiguration10
5.1PeriperalConfig10
5.2InterruptConfig10
6CompileEnvironment10
1Introduction
1.1Overview
ThisdocumentdescribestheimplementationofthewatchdogdrivertobedevelopedintheframeoftheGEMS-K1project.Itisbasedonthewatchdogspecificationdocument.
ThesafetymonitordriverisimplementedbytricoreofTC1766
ThesoftwareisconfiguredtoalwaysservicetheWatchdogTimerbeforeitoverflows,theWatchdogTimerwillTime-outiftheprogramdoesnotprogressproperly.TheWatchdogTimeralsotimesoutifthesoftwareerrorwasduetohardware-relatedfailures.Thisoperationpreventsthecontrollerfrommalfunctioningforlongerthanauser-specifiedtime.
1.2Reference
[1]WatchDog_DRIVER_SPEC.doc
[2]
2.Typedefinition
Type
Description
Range
3GlobalVariable
Thischapterdescribestheglobalvariableusedbyscheduler.
Varialbes
Type
Description
4FunctionDefinitions
4.1SCU_vInit
Syntax
voidSCU_vInit(void)
Parameters
none
Return
none
Notification
Description
Thisfunctioninitializestheregistersrelatedtowatchdogdriver.
Indetailsthefunctionconfiguresthefollowing:
∙Configurethewatchdogmaxserviceinterval
∙initializestheregistersrelatedtowatchdog
Reentrancy
No
Remarks
4.2
SCU_vServiceWDT
Syntax
voidSCU_vServiceWDT(ushortusReload,ubyteubPassword)
Parameters
ushortusReload//reloadvalueforthewatchdogtimer
ubyteubPassword//password
Return
None
Notification
Description
Servicewatchdogtoavoidoverflowofwatchdog
Reentrancy
No
Remarks
4.3SCU_vDisableWDT
Syntax
voidSCU_vDisableWDT(void)
Parameters
None
Return
None
Notification
Description
Disablewatchdog
Reentrancy
No
Remarks
4.4SCU_vEnableWDT
Syntax
voidSCU_vEnableWDT(void)
Parameters
None
Return
None
Notification
Description
enablewatchdog
Reentrancy
No
Remarks
5ResourcesConfiguration
5.1PeriperalConfig
Source
Description
5.2InterruptConfig
Source
SRN
TOS
Priority
Name
Description
6CompileEnvironment
CompileTool:
TaskingVX-ToolsetforTricorev2.2r3