Specification of GPT Driver
AUTOSAR CP R20-11
5 of 70 Document ID 30: AUTOSAR_SWS_GPTDriver
Table of Contents
1 Introduction and functional overview .................................................................... 7
2 Acronyms, abbreviations and terms ..................................................................... 8
3 Related documentation ......................................................................................... 9
3.1 Input documents.............................................................................................. 9
3.2 Related standards and norms ....................................................................... 10
3.3 Related specification ..................................................................................... 10
4 Constraints and assumptions ............................................................................. 11
4.1 Assumptions .................................................................................................. 11
4.2 Limitations ..................................................................................................... 11
4.3 Applicability to car domains .......................................................................... 11
5 Dependencies to other modules ......................................................................... 12
6 Requirements traceability ................................................................................... 13
7 Functional specification ...................................................................................... 21
7.1 General behavior .......................................................................................... 21
7.2 GPT Predef Timers ....................................................................................... 24
7.3 Version checking ........................................................................................... 26
7.4 Error classification ......................................................................................... 26
7.4.1 Development Errors .................................................................................. 26
7.4.2 Runtime Errors .......................................................................................... 27
7.4.3 Transient Faults ........................................................................................ 27
7.4.4 Production Errors ...................................................................................... 27
7.4.5 Extended Production Errors ...................................................................... 27
8 API specification ................................................................................................. 28
8.1 Imported types .............................................................................................. 28
8.2 Type Definitions ............................................................................................ 28
8.2.1 Gpt_ConfigType ........................................................................................ 28
8.2.2 Gpt_ChannelType ..................................................................................... 28
8.2.3 Gpt_ValueType ......................................................................................... 29
8.2.4 Gpt_ModeType ......................................................................................... 29
8.2.5 Gpt_PredefTimerType............................................................................... 30
8.3 Function definitions ....................................................................................... 30
8.3.1 Gpt_GetVersionInfo .................................................................................. 30
8.3.2 Gpt_Init ...................................................................................................... 31
8.3.3 Gpt_DeInit ................................................................................................. 33
8.3.4 Gpt_GetTimeElapsed ................................................................................ 34
8.3.5 Gpt_GetTimeRemaining ........................................................................... 36
8.3.6 Gpt_StartTimer .......................................................................................... 37
8.3.7 Gpt_StopTimer .......................................................................................... 39
8.3.8 Gpt_EnableNotification ............................................................................. 40
8.3.9 Gpt_DisableNotification ............................................................................ 41
8.3.10 Gpt_SetMode ............................................................................................ 42
8.3.11 Gpt_DisableWakeup ................................................................................. 44