DEENESPTFRRUARHIKOZHNL

Time Service (Tm)

ModulTm (Time Service)
BSW-Modul-ID14
Standard-Header#include "Tm.h"
SWS-SpezifikationAUTOSAR_CP_SWS_TimeService.pdf, AUTOSAR_SWS_TimeService.pdf
Umfang79 Records · 8 Snippets
ClusterZeitsynchronisation

Time Service (Tm)

AUTOSAR Classic System Services-Modul Time Service (Tm, Spezifikation: AUTOSAR_CP_SWS_TimeService.pdf, AUTOSAR_SWS_TimeService.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

функция Tm_ResetTimer1us16bit [SWS_Tm_00038] 📄 PDF

Std_ReturnType Tm_ResetTimer1us16bit(Tm_PredefTimer1us16bitType* TimerPtr);

Resets a timer instance (user point of view).

функция Tm_GetTimeSpan1us16bit [SWS_Tm_00039] 📄 PDF

Std_ReturnType Tm_GetTimeSpan1us16bit(const Tm_PredefTimer1us16bitType* TimerPtr, uint16* TimeSpanPtr);

Delivers the time difference (current time - reference time).

функция Tm_ShiftTimer1us16bit [SWS_Tm_00040] 📄 PDF

void Tm_ShiftTimer1us16bit(Tm_PredefTimer1us16bitType* TimerPtr, uint16 TimeValue);

Shifts the reference time of the timer instance.

функция Tm_SyncTimer1us16bit [SWS_Tm_00041] 📄 PDF

void Tm_SyncTimer1us16bit(Tm_PredefTimer1us16bitType* TimerDstPtr, const Tm_PredefTimer1us16bitType* TimerSrcPtr);

Synchronizes two timer instances.

функция Tm_ResetTimer1us24bit [SWS_Tm_00043] 📄 PDF

Std_ReturnType Tm_ResetTimer1us24bit(Tm_PredefTimer1us24bitType* TimerPtr);

Resets a timer instance (use r point of view).

функция Tm_GetTimeSpan1us24bit [SWS_Tm_00044] 📄 PDF

Std_ReturnType Tm_GetTimeSpan1us24bit(const Tm_PredefTimer1us24bitType* TimerPtr, uint32* TimeSpanPtr);

Service Name Tm_ Get Time Span1us24bit Syntax Std_ Return Type Tm_ Get Time Span1us24bit ( const Tm_ Predef Timer1us24bit Type* Timer Ptr, uint32* Time Span Ptr ) Service ID [hex] 0x8 Sync/ Async Synchronous Reentrancy Reentrant Parameters (in) Timer Ptr Pointer to a timer instance defined by the user. Parameters (inout) None Parameters (out) Time Span Ptr Pointer to time span destination data in RAM Return value Std _ Return - Type E_ OK: The underlying GPT driver service has returned E_ OK and no development error has been detected E_ NOT_ OK: The underlying GPT driver service has returned E_ NOT_ OK, or a development error has been detected Descripti on Delivers the time difference (current time - reference time). Available via Tm.h

функция Tm_ShiftTimer1us24bit [SWS_Tm_00045] 📄 PDF

void Tm_ShiftTimer1us24bit(Tm_PredefTimer1us24bitType* TimerPtr, uint32 TimeValue);

Shifts the reference time of the timer instance.

функция Tm_SyncTimer1us24bit [SWS_Tm_00046] 📄 PDF

void Tm_SyncTimer1us24bit(Tm_PredefTimer1us24bitType* TimerDstPtr, const Tm_PredefTimer1us24bitType* TimerSrcPtr);

Synchronizes two timer instances.

функция Tm_ResetTimer1us32bit [SWS_Tm_00048] 📄 PDF

Std_ReturnType Tm_ResetTimer1us32bit(Tm_PredefTimer1us32bitType* TimerPtr);

Resets a timer instance (user point of view).

функция Tm_GetTimeSpan1us32bit [SWS_Tm_00049] 📄 PDF

Std_ReturnType Tm_GetTimeSpan1us32bit(const Tm_PredefTimer1us32bitType* TimerPtr, uint32* TimeSpanPtr);

Delivers the time difference (current time - reference time).

функция Tm_ShiftTimer1us32bit [SWS_Tm_00050] 📄 PDF

void Tm_ShiftTimer1us32bit(Tm_PredefTimer1us32bitType* TimerPtr, uint32 TimeValue);

Shifts the reference time of the timer instance.

функция Tm_SyncTimer1us32bit [SWS_Tm_00051] 📄 PDF

void Tm_SyncTimer1us32bit(Tm_PredefTimer1us32bitType* TimerDstPtr, const Tm_PredefTimer1us32bitType* TimerSrcPtr);

Synchronizes two timer instances.

функция Tm_ResetTimer100us32bit [SWS_Tm_00053] 📄 PDF

Std_ReturnType Tm_ResetTimer100us32bit(Tm_PredefTimer100us32bitType* TimerPtr);

Resets a timer instance (use r point of view).

функция Tm_GetTimeSpan100us32bit [SWS_Tm_00054] 📄 PDF

Std_ReturnType Tm_GetTimeSpan100us32bit(const Tm_PredefTimer100us32bitType* TimerPtr, uint32* TimeSpanPtr);

Service Name Tm_ Get Time Span100us32bit Syntax Std_ Return Type Tm_ Get Time Span100us32bit ( const Tm_ Predef Timer100us32bit Type* Timer Ptr, uint32* Time Span Ptr ) Service ID [hex] 0x12 Sync/ Async Synchronous Reentrancy Reentrant Parameters (in) Timer Ptr Pointer to a timer instance defined by the user. Parameters (inout) None Parameters (out) Time Span Ptr Pointer to time span destination data in RAM Return value Std _ Return - Type E_ OK: The underlying GPT driver service has returned E_ OK and no development error has been detected E_ NOT_ OK: The underlying GPT driver service has returned E_ NOT_ OK, or a development error has been detected Descripti on Delivers the time difference (current time - reference time). Available via Tm.h

функция Tm_ShiftTimer100us32bit [SWS_Tm_00055] 📄 PDF

void Tm_ShiftTimer100us32bit(Tm_PredefTimer100us32bitType* TimerPtr, uint32 TimeValue);

Shifts the reference time of the timer instance.

функция Tm_SyncTimer100us32bit [SWS_Tm_00056] 📄 PDF

void Tm_SyncTimer100us32bit(Tm_PredefTimer100us32bitType* TimerDstPtr, const Tm_PredefTimer100us32bitType* TimerSrcPtr);

Synchronizes two timer instances.

тип Tm_PredefTimer1us16bitType [SWS_Tm_00032] 📄 PDF

Data type of Time Service Predef Timer 1us16bit. The structure contains the reference time.

тип Tm_PredefTimer1us24bitType [SWS_Tm_00033] 📄 PDF

Data type of Time Service Predef Timer 1us24bit. The structure contains the reference time.

тип Tm_PredefTimer1us32bitType [SWS_Tm_00034] 📄 PDF

Data type of Time Service Predef Timer 1us32bit. The structure contains the reference time.

тип Tm_PredefTimer100us32bitType [SWS_Tm_00035] 📄 PDF

Data type of Time Service Predef Timer 100µs32bit. The structure contains the reference time.

requirement SWS_Tm_00001 [SWS_Tm_00001] 📄 PDF

The Time Service module shall use the G PT driver service Gpt_GetPredefTimerValue to get the current time value for the desired Predef Timer.

requirement SWS_Tm_00002 [SWS_Tm_00002] 📄 PDF

The “ 1us16bit ” functions shall use the Timer GPT_PREDEF_TIMER_1US_16BIT as time base if a time base is needed .

requirement SWS_Tm_00003 [SWS_Tm_00003] 📄 PDF

The “ 1us24bit ” functions shall use the Timer GPT_PREDEF_TIMER_1US_24BIT as time base if a time base is needed .

requirement SWS_Tm_00004 [SWS_Tm_00004] 📄 PDF

The “ 1us32bit ” functio ns shall use the Timer GPT_PREDEF_TIMER_1US_32BIT as time base if a time base is needed .

requirement SWS_Tm_00005 [SWS_Tm_00005] 📄 PDF

The “ 100us32bit ” functions shall use the Timer GPT_PREDEF_TIMER_100US_32BIT as time base if a time base is needed .

requirement SWS_Tm_00006 [SWS_Tm_00006] 📄 PDF

The ResetTimer functions shall reset the timer instance passed by the parameter TimerPtr . This means, the reference time of the timer instance shall be set to the current time of the related GPT Predef Timer.

requirement SWS_Tm_00007 [SWS_Tm_00007] 📄 PDF

The ResetTim er functions shall be reentrant, if the timer instances used in concurrent calls are different.

requirement SWS_Tm_00008 [SWS_Tm_00008] 📄 PDF

[SWS_Tm_00008] Upstream requirements: SRS_BSW_00369, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the param- eter timerId is not a valid timer instance, the Tm_ResetTimer functions shall raise the development error TM_E_PARAM_VALUE.⌋

requirement SWS_Tm_00009 [SWS_Tm_00009] 📄 PDF

The GetTimeSpan functions shall calc ulate and deliver the time difference between the current time and the reference time of the timer instance.

requirement SWS_Tm_00010 [SWS_Tm_00010] 📄 PDF

The GetTimeSpan functions shall perform proper wrap - around handling at subtraction (current time - reference time), if value of current time is less than value of reference time .

requirement SWS_Tm_00011 [SWS_Tm_00011] 📄 PDF

The GetTimeSpan functions shall be fully reentrant, this means even for the same timer instance.

requirement SWS_Tm_00012 [SWS_Tm_00012] 📄 PDF

[SWS_Tm_00012] Upstream requirements: SRS_BSW_00369, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the pointer parameter (timeSpan) is a null pointer, the Tm_GetTimeSpan functions shall raise the development error TM_E_PARAM_POINTER.⌋

requirement SWS_Tm_00013 [SWS_Tm_00013] 📄 PDF

The ShiftTimer functions shall shift the reference time of the timer instance. This means, the value TimeValue shall be added to the reference time of the timer instance.

requirement SWS_Tm_00014 [SWS_Tm_00014] 📄 PDF

The ShiftTimer functions shall perform proper wrap - around handling at adding (reference time + TimeValue), if the sum is greater than the maximum value of the timer.

requirement SWS_Tm_00015 [SWS_Tm_00015] 📄 PDF

The ShiftTimer functions with range 24bit shall limit the value of the parameter TimeValue to 0xFFFFFF.

requirement SWS_Tm_00016 [SWS_Tm_00016] 📄 PDF

If development error detection for the Time Service module is enabled: I f the value of the parameter TimeValue is greater than 0x FFFFFF , the ShiftTimer functions with range 24bit shall raise the error TM_E_PARAM_VALUE.

requirement SWS_Tm_00017 [SWS_Tm_00017] 📄 PDF

The ShiftTimer functions shall be reentrant, if the timer instances used in concurrent calls are different.

requirement SWS_Tm_00019 [SWS_Tm_00019] 📄 PDF

The SyncTimer functions shall synchronize two timer instances. This means, the reference time of the destination timer instance shall be set to the reference time of the source timer instance.

requirement SWS_Tm_00020 [SWS_Tm_00020] 📄 PDF

The SyncTimer functions shall be reentrant, if the destination timer instances used in concurrent calls are different.

requirement SWS_Tm_00022 [SWS_Tm_00022] 📄 PDF

The BusyWait functions shall perform busy waiting for the minimum time passed by the parameter WaitingTimeMin .

requirement SWS_Tm_00023 [SWS_Tm_00023] 📄 PDF

The BusyWait functions shall not disable the interrupts. T his means the real waiting time may be greater than t he desired waiting time .

requirement SWS_Tm_00024 [SWS_Tm_00024] 📄 PDF

The BusyWait functions shall guarantee the minimum waiting . This means, n+1 ticks must be observed to ensure that an interval of at least n ticks has passed.

requirement SWS_Tm_00026 [SWS_Tm_00026] 📄 PDF

For each Predef Timer enabled by configuration the following set of API services shall be available: ResetTimer, GetTimeSpan, ShiftTimer, SyncTimer.

requirement SWS_Tm_00027 [SWS_Tm_00027] 📄 PDF

For each Predef Timer with tick duration 1µs enabled by configuration t he API service BusyWait shall be available.

requirement SWS_Tm_00028 [SWS_Tm_00028] 📄 PDF

Type of error Related error code Error value API parameter checking: invalid pointer TM_ E_ PARAM_ POINTER 0x01 API parameter checking: invalid value TM_ E_ PARAM_ VALUE 0x02

requirement SWS_Tm_00030 [SWS_Tm_00030] 📄 PDF

Additional errors that are detected because of specific implementation shall be added in the specific implementation specification. The classification and enumeration shall be compa tible to the errors listed .

requirement SWS_Tm_00031 [SWS_Tm_00031] 📄 PDF

Module Header File Imported Type Gpt Gpt.h Gpt _ Predef Timer Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

requirement SWS_Tm_00057 [SWS_Tm_00057] 📄 PDF

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Gpt _ Get Predef - Timer Value Gpt.h Delivers the current value of the desired GPT Predef Timer.

requirement SWS_Tm_00059 [SWS_Tm_00059] 📄 PDF

These requirements are not applicable to this specific ation.

requirement SWS_Tm_00060 [SWS_Tm_00060] 📄 PDF

Det _ Report Error Det.h Service to report development errors.

requirement SWS_Tm_00063 [SWS_Tm_00063] 📄 PDF

When an error occurs the corresponding Time Service function shall return without any action , unless it is specified for the specific function differently / more in detail.

requirement SWS_Tm_00064 [SWS_Tm_00064] 📄 PDF

If the underlying GPT driver service returns E_NOT_OK , the functions ResetTimer , GetTimeSpan and BusyWait shall raise the error TM_E_HARDWARE_TIMER .

requirement SWS_Tm_00065 [SWS_Tm_00065] 📄 PDF

When an error is detected and the parameter TimeSpanPtr is not a null pointer, the GetTimeSpan functions shall deliver th e time span “ 0 ”.

requirement SWS_Tm_00066 [SWS_Tm_00066] 📄 PDF

When an error is detected , the BusyWait functions shall return E_NOT_OK and shall abort “waiting” immediately .

requirement SWS_Tm_00067 [SWS_Tm_00067] 📄 PDF

Type of error Related error code Error value Access to underlying hardware timer failed TM_ E_ HARDWARE_ TIMER 0x03

requirement SWS_Tm_00068 [SWS_Tm_00068] 📄 PDF

[SWS_Tm_00068] [SWS_Tm_00069] [SWS_Tm_00070] [SWS_Tm_00071] [SWS_ Tm_00077]

requirement SWS_Tm_00082 [SWS_Tm_00082] 📄 PDF

[SWS_Tm_00082] Unknown timer Upstream requirements: SRS_BSW_00386, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the parame- ter timerId is not a valid timer instance, the Tm_GetTimeSpan functions shall raise the development error TM_E_PARAM_VALUE.⌋

requirement SWS_Tm_91007 [SWS_Tm_91007] 📄 PDF

[SWS_Tm_91007] [SWS_Tm_91008] B.2.2 Changed Specification Items in R24-11 [ECUC_Tm_00001] [ECUC_Tm_00008]

requirement SWS_Tm_91008 [SWS_Tm_91008] 📄 PDF

[SWS_Tm_91008] B.2.2 Changed Specification Items in R24-11 [ECUC_Tm_00001] [ECUC_Tm_00008]

requirement SWS_Tm_CONSTR_00001 [SWS_Tm_CONSTR_00001] 📄 PDF

[SWS_Tm_CONSTR_00001] [SWS_Tm_CONSTR_00002] B.2.5 Changed Constraints in R24-11 none B.2.6 Deleted Constraints in R24-11 none B.3 Differences between R22-11 and R23-11 B.3.1 Added Specification Items in R23-11 none

requirement SWS_Tm_CONSTR_00002 [SWS_Tm_CONSTR_00002] 📄 PDF

[SWS_Tm_CONSTR_00002] B.2.5 Changed Constraints in R24-11 none B.2.6 Deleted Constraints in R24-11 none B.3 Differences between R22-11 and R23-11 B.3.1 Added Specification Items in R23-11 none

requirement SWS_Tm_NA_00059 [SWS_Tm_NA_00059] 📄 PDF

[SWS_Tm_NA_00059] Upstream requirements: SRS_BSW_00159, SRS_BSW_00167, SRS_BSW_00170, SRS_BSW_ 00398, SRS_BSW_00416, SRS_BSW_00437, SRS_BSW_00168, SRS_BSW_00423, SRS_BSW_00424, SRS_BSW_00425, SRS_BSW_ 00426, SRS_BSW_00427, SRS_BSW_00428, SRS_BSW_00429, SRS_BSW_00432, SRS_BSW_00433, SRS_BSW_00422, SRS_BSW_ 00417, SRS_BSW_00161, SRS_BSW_00162, SRS_BSW_00005, SRS_BSW_00415, SRS_BSW_00325, SRS_BSW_00342, SRS_BSW_ 00160, SRS_BSW_00007, SRS_BSW_00413, SRS_BSW_00347, SRS_BSW_00307, SRS_BSW_00373, SRS_BSW_00335, SRS_BSW_ 00353, SRS_BSW_00328, SRS_BSW_00006, SRS_BSW_00439, SRS_BSW_00357, SRS_BSW_00377, SRS_BSW_00378, SRS_BSW_ 00306, SRS_BSW_00308, SRS_BSW_00309, SRS_BSW_00359, SRS_BSW_00360, SRS_BSW_00440, SRS_BSW_00330, SRS_BSW_ 00331, SRS_BSW_00009, SRS_BSW_00172, SRS_BSW_00010, SRS_BSW_00333, SRS_BSW_00321, SRS_BSW_00341 ⌈These requirements are not applicable to this specification.⌋ B History of Constraints and Specification Items B.1 Differences between R24-11 and R25-11 B.1.1 Added Specification Items in R25-11 none B.1.2 Changed Specification Items in R25-11 none B.1.3 Deleted Specification Items in R25-11 none B.1.4 Added Constraints in R25-11 none B.1.5 Changed Constraints in R25-11 none B.1.6 Deleted Constraints in R25-11 none B.2 Differences between R23-11 and R24-11 B.2.1 Added Specification Items in R24-11 [ECUC_Tm_00009] [ECUC_Tm_00010] [ECUC_Tm_00011] [ECUC_Tm_00012]

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_Tm
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Tm@rel:R20-11#9f1538de
Content hash
9f1538de
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_TimeService.pdf#nameddest=SWS_Tm_00036

Инициализация и состояние

Tm_GetVersionInfo функция

Returns the version information of this module.

void Tm_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);

Сервисы

Tm_BusyWait1us функция

Performs busy waiting by polling with a guaranteed minimum waiting time.

Std_ReturnType Tm_BusyWait1us(uint8 WaitingTimeMin);
Tm_BusyWait1us16bit функция

Performs busy waiting by polling with a guaranteed minimum waiting time.

Std_ReturnType Tm_BusyWait1us16bit(uint8 WaitingTimeMin);
Tm_BusyWait1us24bit функция

Performs busy waiting by polling with a guaranteed minimum waiting time.

Std_ReturnType Tm_BusyWait1us24bit(uint8 WaitingTimeMin);
Tm_BusyWait1us32bit функция

Performs busy waiting by polling with a guaranteed minimum waiting time.

Std_ReturnType Tm_BusyWait1us32bit(uint8 WaitingTimeMin);
Tm_GetTimeSpan функция

Delivers the (relative) value of the time since the last reset (or shifting) of the timer instance.

Std_ReturnType Tm_GetTimeSpan(uint32 timerId, uint32* timeSpan);

Service Name Tm_ Get Time Span100us32bit Syntax Std_ Return Type Tm_ Get Time Span100us32bit ( const Tm_ Predef Timer100us32bit Type* Timer Ptr, uint32* Time Span Ptr ) Service ID [hex] 0x12 Sync/ Async Synchronous Reentrancy Reentrant Parameters (in) Timer Ptr Pointer to a timer instance defined by the user. Parameters (inout) None Parameters (out) Time Span Ptr Pointer to time span destination data in RAM Return value Std _ Return - Type E_ OK: The underlying GPT driver service has returned E_ OK and no development error has been detected E_ NOT_ OK: The underlying GPT driver service has returned E_ NOT_ OK, or a development error has been detected Descripti on Delivers the time difference (current time - reference time). Available via Tm.h

Std_ReturnType Tm_GetTimeSpan100us32bit(const Tm_PredefTimer100us32bitType* TimerPtr, uint32* TimeSpanPtr);
Tm_GetTimeSpan1us16bit функция

Delivers the time difference (current time - reference time).

Std_ReturnType Tm_GetTimeSpan1us16bit(const Tm_PredefTimer1us16bitType* TimerPtr, uint16* TimeSpanPtr);
Tm_GetTimeSpan1us24bit функция

Service Name Tm_ Get Time Span1us24bit Syntax Std_ Return Type Tm_ Get Time Span1us24bit ( const Tm_ Predef Timer1us24bit Type* Timer Ptr, uint32* Time Span Ptr ) Service ID [hex] 0x8 Sync/ Async Synchronous Reentrancy Reentrant Parameters (in) Timer Ptr Pointer to a timer instance defined by the user. Parameters (inout) None Parameters (out) Time Span Ptr Pointer to time span destination data in RAM Return value Std _ Return - Type E_ OK: The underlying GPT driver service has returned E_ OK and no development error has been detected E_ NOT_ OK: The underlying GPT driver service has returned E_ NOT_ OK, or a development error has been detected Descripti on Delivers the time difference (current time - reference time). Available via Tm.h

Std_ReturnType Tm_GetTimeSpan1us24bit(const Tm_PredefTimer1us24bitType* TimerPtr, uint32* TimeSpanPtr);
Tm_GetTimeSpan1us32bit функция

Delivers the time difference (current time - reference time).

Std_ReturnType Tm_GetTimeSpan1us32bit(const Tm_PredefTimer1us32bitType* TimerPtr, uint32* TimeSpanPtr);
Tm_ResetTimer функция

Reset a timer instance by setting the reference time to the current value of the related PreDef Timer.

Std_ReturnType Tm_ResetTimer(uint32 timerId);

Resets a timer instance (use r point of view).

Std_ReturnType Tm_ResetTimer100us32bit(Tm_PredefTimer100us32bitType* TimerPtr);
Tm_ResetTimer1us16bit функция

Resets a timer instance (user point of view).

Std_ReturnType Tm_ResetTimer1us16bit(Tm_PredefTimer1us16bitType* TimerPtr);
Tm_ResetTimer1us24bit функция

Resets a timer instance (use r point of view).

Std_ReturnType Tm_ResetTimer1us24bit(Tm_PredefTimer1us24bitType* TimerPtr);
Tm_ResetTimer1us32bit функция

Resets a timer instance (user point of view).

Std_ReturnType Tm_ResetTimer1us32bit(Tm_PredefTimer1us32bitType* TimerPtr);

Shifts the reference time of the timer instance.

void Tm_ShiftTimer100us32bit(Tm_PredefTimer100us32bitType* TimerPtr, uint32 TimeValue);
Tm_ShiftTimer1us16bit функция

Shifts the reference time of the timer instance.

void Tm_ShiftTimer1us16bit(Tm_PredefTimer1us16bitType* TimerPtr, uint16 TimeValue);
Tm_ShiftTimer1us24bit функция

Shifts the reference time of the timer instance.

void Tm_ShiftTimer1us24bit(Tm_PredefTimer1us24bitType* TimerPtr, uint32 TimeValue);
Tm_ShiftTimer1us32bit функция

Shifts the reference time of the timer instance.

void Tm_ShiftTimer1us32bit(Tm_PredefTimer1us32bitType* TimerPtr, uint32 TimeValue);
Tm_SyncTimer100us32bit функция

Synchronizes two timer instances.

void Tm_SyncTimer100us32bit(Tm_PredefTimer100us32bitType* TimerDstPtr, const Tm_PredefTimer100us32bitType* TimerSrcPtr);
Tm_SyncTimer1us16bit функция

Synchronizes two timer instances.

void Tm_SyncTimer1us16bit(Tm_PredefTimer1us16bitType* TimerDstPtr, const Tm_PredefTimer1us16bitType* TimerSrcPtr);
Tm_SyncTimer1us24bit функция

Synchronizes two timer instances.

void Tm_SyncTimer1us24bit(Tm_PredefTimer1us24bitType* TimerDstPtr, const Tm_PredefTimer1us24bitType* TimerSrcPtr);
Tm_SyncTimer1us32bit функция

Synchronizes two timer instances.

void Tm_SyncTimer1us32bit(Tm_PredefTimer1us32bitType* TimerDstPtr, const Tm_PredefTimer1us32bitType* TimerSrcPtr);

Типы

Data type of Time Service Predef Timer 100µs32bit. The structure contains the reference time.

Data type of Time Service Predef Timer 1us16bit. The structure contains the reference time.

Data type of Time Service Predef Timer 1us24bit. The structure contains the reference time.

Data type of Time Service Predef Timer 1us32bit. The structure contains the reference time.

Требования

SWS_Tm_00001 requirement

The Time Service module shall use the G PT driver service Gpt_GetPredefTimerValue to get the current time value for the desired Predef Timer.

SWS_Tm_00002 requirement

The “ 1us16bit ” functions shall use the Timer GPT_PREDEF_TIMER_1US_16BIT as time base if a time base is needed .

SWS_Tm_00003 requirement

The “ 1us24bit ” functions shall use the Timer GPT_PREDEF_TIMER_1US_24BIT as time base if a time base is needed .

SWS_Tm_00004 requirement

The “ 1us32bit ” functio ns shall use the Timer GPT_PREDEF_TIMER_1US_32BIT as time base if a time base is needed .

SWS_Tm_00005 requirement

The “ 100us32bit ” functions shall use the Timer GPT_PREDEF_TIMER_100US_32BIT as time base if a time base is needed .

SWS_Tm_00006 requirement

The ResetTimer functions shall reset the timer instance passed by the parameter TimerPtr . This means, the reference time of the timer instance shall be set to the current time of the related GPT Predef Timer.

SWS_Tm_00007 requirement

The ResetTim er functions shall be reentrant, if the timer instances used in concurrent calls are different.

SWS_Tm_00008 requirement

[SWS_Tm_00008] Upstream requirements: SRS_BSW_00369, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the param- eter timerId is not a valid timer instance, the Tm_ResetTimer functions shall raise the development error TM_E_PARAM_VALUE.⌋

SWS_Tm_00009 requirement

The GetTimeSpan functions shall calc ulate and deliver the time difference between the current time and the reference time of the timer instance.

SWS_Tm_00010 requirement

The GetTimeSpan functions shall perform proper wrap - around handling at subtraction (current time - reference time), if value of current time is less than value of reference time .

SWS_Tm_00011 requirement

The GetTimeSpan functions shall be fully reentrant, this means even for the same timer instance.

SWS_Tm_00012 requirement

[SWS_Tm_00012] Upstream requirements: SRS_BSW_00369, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the pointer parameter (timeSpan) is a null pointer, the Tm_GetTimeSpan functions shall raise the development error TM_E_PARAM_POINTER.⌋

SWS_Tm_00013 requirement

The ShiftTimer functions shall shift the reference time of the timer instance. This means, the value TimeValue shall be added to the reference time of the timer instance.

SWS_Tm_00014 requirement

The ShiftTimer functions shall perform proper wrap - around handling at adding (reference time + TimeValue), if the sum is greater than the maximum value of the timer.

SWS_Tm_00015 requirement

The ShiftTimer functions with range 24bit shall limit the value of the parameter TimeValue to 0xFFFFFF.

SWS_Tm_00016 requirement

If development error detection for the Time Service module is enabled: I f the value of the parameter TimeValue is greater than 0x FFFFFF , the ShiftTimer functions with range 24bit shall raise the error TM_E_PARAM_VALUE.

SWS_Tm_00017 requirement

The ShiftTimer functions shall be reentrant, if the timer instances used in concurrent calls are different.

SWS_Tm_00018 requirement

[SWS_Tm_00018]

SWS_Tm_00019 requirement

The SyncTimer functions shall synchronize two timer instances. This means, the reference time of the destination timer instance shall be set to the reference time of the source timer instance.

SWS_Tm_00020 requirement

The SyncTimer functions shall be reentrant, if the destination timer instances used in concurrent calls are different.

SWS_Tm_00021 requirement

[SWS_Tm_00021] [SWS_Tm_00022] [SWS_Tm_00023]

SWS_Tm_00022 requirement

The BusyWait functions shall perform busy waiting for the minimum time passed by the parameter WaitingTimeMin .

SWS_Tm_00023 requirement

The BusyWait functions shall not disable the interrupts. T his means the real waiting time may be greater than t he desired waiting time .

SWS_Tm_00024 requirement

The BusyWait functions shall guarantee the minimum waiting . This means, n+1 ticks must be observed to ensure that an interval of at least n ticks has passed.

SWS_Tm_00025 requirement

The B usyWait functions shall be reentrant.

SWS_Tm_00026 requirement

For each Predef Timer enabled by configuration the following set of API services shall be available: ResetTimer, GetTimeSpan, ShiftTimer, SyncTimer.

SWS_Tm_00027 requirement

For each Predef Timer with tick duration 1µs enabled by configuration t he API service BusyWait shall be available.

SWS_Tm_00028 requirement

Type of error Related error code Error value API parameter checking: invalid pointer TM_ E_ PARAM_ POINTER 0x01 API parameter checking: invalid value TM_ E_ PARAM_ VALUE 0x02

SWS_Tm_00030 requirement

Additional errors that are detected because of specific implementation shall be added in the specific implementation specification. The classification and enumeration shall be compa tible to the errors listed .

SWS_Tm_00031 requirement

Module Header File Imported Type Gpt Gpt.h Gpt _ Predef Timer Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

SWS_Tm_00057 requirement

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Gpt _ Get Predef - Timer Value Gpt.h Delivers the current value of the desired GPT Predef Timer.

SWS_Tm_00059 requirement

These requirements are not applicable to this specific ation.

SWS_Tm_00060 requirement

Det _ Report Error Det.h Service to report development errors.

SWS_Tm_00063 requirement

When an error occurs the corresponding Time Service function shall return without any action , unless it is specified for the specific function differently / more in detail.

SWS_Tm_00064 requirement

If the underlying GPT driver service returns E_NOT_OK , the functions ResetTimer , GetTimeSpan and BusyWait shall raise the error TM_E_HARDWARE_TIMER .

SWS_Tm_00065 requirement

When an error is detected and the parameter TimeSpanPtr is not a null pointer, the GetTimeSpan functions shall deliver th e time span “ 0 ”.

SWS_Tm_00066 requirement

When an error is detected , the BusyWait functions shall return E_NOT_OK and shall abort “waiting” immediately .

SWS_Tm_00067 requirement

Type of error Related error code Error value Access to underlying hardware timer failed TM_ E_ HARDWARE_ TIMER 0x03

SWS_Tm_00068 requirement

[SWS_Tm_00068] [SWS_Tm_00069] [SWS_Tm_00070] [SWS_Tm_00071] [SWS_ Tm_00077]

SWS_Tm_00069 requirement

[SWS_Tm_00069] [SWS_Tm_00070] [SWS_Tm_00071] [SWS_ Tm_00077]

SWS_Tm_00070 requirement

[SWS_Tm_00070] [SWS_Tm_00071] [SWS_ Tm_00077]

SWS_Tm_00071 requirement

[SWS_Tm_00071] [SWS_ Tm_00077]

SWS_Tm_00082 requirement

[SWS_Tm_00082] Unknown timer Upstream requirements: SRS_BSW_00386, SRS_BSW_00323 ⌈If development error detection for the Time Service module is enabled: If the parame- ter timerId is not a valid timer instance, the Tm_GetTimeSpan functions shall raise the development error TM_E_PARAM_VALUE.⌋

SWS_Tm_91000 requirement

[SWS_Tm_91000]

SWS_Tm_91001 requirement

[SWS_Tm_91001]

SWS_Tm_91004 requirement

[SWS_Tm_91004] [SWS_Tm_91005] [SWS_Tm_91006]

SWS_Tm_91005 requirement

[SWS_Tm_91005] [SWS_Tm_91006]

SWS_Tm_91007 requirement

[SWS_Tm_91007] [SWS_Tm_91008] B.2.2 Changed Specification Items in R24-11 [ECUC_Tm_00001] [ECUC_Tm_00008]

SWS_Tm_91008 requirement

[SWS_Tm_91008] B.2.2 Changed Specification Items in R24-11 [ECUC_Tm_00001] [ECUC_Tm_00008]

[SWS_Tm_CONSTR_00001] [SWS_Tm_CONSTR_00002] B.2.5 Changed Constraints in R24-11 none B.2.6 Deleted Constraints in R24-11 none B.3 Differences between R22-11 and R23-11 B.3.1 Added Specification Items in R23-11 none

[SWS_Tm_CONSTR_00002] B.2.5 Changed Constraints in R24-11 none B.2.6 Deleted Constraints in R24-11 none B.3 Differences between R22-11 and R23-11 B.3.1 Added Specification Items in R23-11 none

SWS_Tm_NA_00059 requirement

[SWS_Tm_NA_00059] Upstream requirements: SRS_BSW_00159, SRS_BSW_00167, SRS_BSW_00170, SRS_BSW_ 00398, SRS_BSW_00416, SRS_BSW_00437, SRS_BSW_00168, SRS_BSW_00423, SRS_BSW_00424, SRS_BSW_00425, SRS_BSW_ 00426, SRS_BSW_00427, SRS_BSW_00428, SRS_BSW_00429, SRS_BSW_00432, SRS_BSW_00433, SRS_BSW_00422, SRS_BSW_ 00417, SRS_BSW_00161, SRS_BSW_00162, SRS_BSW_00005, SRS_BSW_00415, SRS_BSW_00325, SRS_BSW_00342, SRS_BSW_ 00160, SRS_BSW_00007, SRS_BSW_00413, SRS_BSW_00347, SRS_BSW_00307, SRS_BSW_00373, SRS_BSW_00335, SRS_BSW_ 00353, SRS_BSW_00328, SRS_BSW_00006, SRS_BSW_00439, SRS_BSW_00357, SRS_BSW_00377, SRS_BSW_00378, SRS_BSW_ 00306, SRS_BSW_00308, SRS_BSW_00309, SRS_BSW_00359, SRS_BSW_00360, SRS_BSW_00440, SRS_BSW_00330, SRS_BSW_ 00331, SRS_BSW_00009, SRS_BSW_00172, SRS_BSW_00010, SRS_BSW_00333, SRS_BSW_00321, SRS_BSW_00341 ⌈These requirements are not applicable to this specification.⌋ B History of Constraints and Specification Items B.1 Differences between R24-11 and R25-11 B.1.1 Added Specification Items in R25-11 none B.1.2 Changed Specification Items in R25-11 none B.1.3 Deleted Specification Items in R25-11 none B.1.4 Added Constraints in R25-11 none B.1.5 Changed Constraints in R25-11 none B.1.6 Deleted Constraints in R25-11 none B.2 Differences between R23-11 and R24-11 B.2.1 Added Specification Items in R24-11 [ECUC_Tm_00009] [ECUC_Tm_00010] [ECUC_Tm_00011] [ECUC_Tm_00012]