WatchDogDRIVERIMPL文档格式.docx
《WatchDogDRIVERIMPL文档格式.docx》由会员分享,可在线阅读,更多相关《WatchDogDRIVERIMPL文档格式.docx(7页珍藏版)》请在冰点文库上搜索。
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<
WatchDog_DRIVER_SPEC.doc>
.
ThesafetymonitordriverisimplementedbytricoreofTC1766
ThesoftwareisconfiguredtoalwaysservicetheWatchdogTimerbeforeitoverflows,theWatchdogTimerwillTime-outiftheprogramdoesnotprogressproperly.TheWatchdogTimeralsotimesoutifthesoftwareerrorwasduetohardware-relatedfailures.Thisoperationpreventsthecontrollerfrommalfunctioningforlongerthanauser-specifiedtime.
1.2Reference
[1]WatchDog_DRIVER_SPEC.doc
[2]
2.Typedefinition
Type
Description
Range
3GlobalVariable
Thischapterdescribestheglobalvariableusedbyscheduler.
Varialbes
4FunctionDefinitions
4.1SCU_vInit
Syntax
voidSCU_vInit(void)
Parameters
none
Return
Notification
Thisfunctioninitializestheregistersrelatedtowatchdogdriver.
Indetailsthefunctionconfiguresthefollowing:
∙Configurethewatchdogmaxserviceinterval
∙initializestheregistersrelatedtowatchdog
Reentrancy
No
Remarks
4.2
SCU_vServiceWDT
voidSCU_vServiceWDT(ushortusReload,ubyteubPassword)
ushortusReload//reloadvalueforthewatchdogtimer
ubyteubPassword//password
None
Servicewatchdogtoavoidoverflowofwatchdog
4.3SCU_vDisableWDT
voidSCU_vDisableWDT(void)
Disablewatchdog
4.4SCU_vEnableWDT
voidSCU_vEnableWDT(void)
enablewatchdog
5ResourcesConfiguration
5.1PeriperalConfig
Source
5.2InterruptConfig
SRN
TOS
Priority
Name
6CompileEnvironment
CompileTool:
TaskingVX-ToolsetforTricorev2.2r3