DEENESPTFRRUARHIKOZHNL

TTCAN Driver (Ttcan)

ModulTtcan (TTCAN Driver)
BSW-Modul-ID84
Standard-Header#include "Ttcan.h"
SWS-SpezifikationAUTOSAR_CP_SWS_TTCANDriver.pdf, AUTOSAR_SWS_TTCANDriver.pdf
Umfang98 Records · 8 Snippets
ClusterCAN-Stack

TTCAN Driver (Ttcan)

AUTOSAR Classic Communication Drivers-Modul TTCAN Driver (Ttcan, Spezifikation: AUTOSAR_CP_SWS_TTCANDriver.pdf, AUTOSAR_SWS_TTCANDriver.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

함수 Can_TTGetControllerTime [SWS_TtCan_00090] 📄 PDF

void Can_TTGetControllerTime(uint8 Controller, Can_TTTimeType* Can_TTGlobalTime, Can_TTTimeType* Can_TTLocalTime, Can_TTTimeType* Can_TTCycleTime, uint8* Can_TTCycleCount);

Gets the current values for the global, local and cycle time and the cycle count of the controller

함수 Can_TTGetMasterState [SWS_TtCan_00091] 📄 PDF

void Can_TTGetMasterState(uint8 Controller, Can_TTMasterStateType* Can_TTMasterState);

Gets the master state. The master state includes the sync mode (sync_off, synchronizing, in_ gap, in_schedule) the master-slave mode (master_off, slave, backup_master, current_master) and the current value for ref trigger offset.

함수 Can_TTGetNTUActual [SWS_TtCan_00092] 📄 PDF

void Can_TTGetNTUActual(uint8 Controller, Can_TTTURType* Can_TTTURAct);

Gets the actual value of NTU (network time unit). Together with the local oscillator period, the actual value of NTU can be derived from the actual value of TUR.

함수 Can_TTGetErrorLevel [SWS_TtCan_00093] 📄 PDF

void Can_TTGetErrorLevel(uint8 Controller, Can_TTErrorLevelType* Can_TTErrorLevel);

Gets the error level. This includes the severity of the error level (S0-S3) and the minimum and maximum value of the message status count.

함수 Can_TTSetTimeCommand [SWS_TtCan_00096] 📄 PDF

void Can_TTSetTimeCommand(uint8 Controller);

Adjusts the global time at the beginning of the next basic cycle by the amount of "global time preset"

함수 Can_TTGlobalTimePreset [SWS_TtCan_00097] 📄 PDF

void Can_TTGlobalTimePreset(uint8 Controller, Can_TTTimeType Can_TTGlobalTimePreset);

Sets the value of "global time preset".

함수 Can_TTSetExtClockSyncCommand [SWS_TtCan_00098] 📄 PDF

void Can_TTSetExtClockSyncCommand(uint8 Controller);

Adjusts the NTU (network time unit) according to the value given by "NTU adjust". Together with the local oscillator period, "TUR adjust" can be derived from "NTU adjust".

함수 Can_TTSetNTUAdjust [SWS_TtCan_00099] 📄 PDF

void Can_TTSetNTUAdjust(uint8 Controller, Can_TTTURType Can_TTTURAdjust);

Sets the value of "NTU adjust". Together with the local oscillator period, "TUR adjust" can be derived from "NTU adjust".

함수 Can_TTSetTimeMark [SWS_TtCan_00102] 📄 PDF

void Can_TTSetTimeMark(uint8 Controller, Can_TTTimeType Can_TTTimeMark, Can_TTTimeSourceType Can_TTTimeSource);

Sets a new value for the time mark for the given time source.

함수 Can_TTAckTimeMark [SWS_TtCan_00104] 📄 PDF

void Can_TTAckTimeMark(uint8 Controller);

Acknowledges the time mark interrupt by resetting the flag in the interrupt vector register.

함수 Can_TTReceive [SWS_TtCan_00108] 📄 PDF

void Can_TTReceive(uint8 Controller, uint8 Hrh, Can_IdType* CanId, uint8* CanDlc, uint8* CanSduPtr);

Reads received data from the controller by returning the pointer of the CanID, the DLC and the Data of the message in the requested HRH.

함수 Can_TTMainFunction_IRQ [SWS_TtCan_00113] 📄 PDF

void Can_TTMainFunction_IRQ(void);

Polls the interrupt flags specific to TTCAN

타입 Can_TTTimeType [SWS_TtCan_00084] 📄 PDF

16 bit value representing time values of TTCAN, e.g. cycle, local or global time

타입 Can_TTMasterStateType [SWS_TtCan_00085] 📄 PDF

Master state type including sync mode, master-slave mode and current ref trigger offset

타입 Can_TTErrorLevelType [SWS_TtCan_00086] 📄 PDF

TTCAN error level including min and max values of message status count

requirement SWS_TtCan_00004 [SWS_TtCan_00004] 📄 PDF

TtcanDrv shall provide information from the TTCAN Con- troller about the timing parameters (see [SWS_TtCan_00090]), the synchronization state and the master state (see [SWS_TtCan_00091]).

requirement SWS_TtCan_00005 [SWS_TtCan_00005] 📄 PDF

TtcanDrv shall provide means to influence the timing pa- rameters of a TTCAN Controller (see [SWS_TtCan_00096], [SWS_TtCan_00097], [SWS_TtCan_00098], [SWS_TtCan_00099]) during runtime, if the TTCAN Con- troller acts as Time Master .

requirement SWS_TtCan_00006 [SWS_TtCan_00006] 📄 PDF

TtcanDrv shall provide the functionality of a timer, which is based on the time marks of the communication system, provided by the TTCAN Con- troller .

requirement SWS_TtCan_00007 [SWS_TtCan_00007] 📄 PDF

TtcanDrv shall support event-synchronized communication (see [SWS_TtCan_00094], [SWS_TtCan_00095]) (refer to [1, ISO 11898-4]).

requirement SWS_TtCan_00009 [SWS_TtCan_00009] 📄 PDF

The events according to Table 7.1 shall be indicated to the ap- plication via TtcanIf .

requirement SWS_TtCan_00010 [SWS_TtCan_00010] 📄 PDF

Type of error Related error code Error value TTCAN Controller is not a potential time master CAN_TT_E_NOT_MASTER 0x08 TTCAN Controller is not a current time master CAN_TT_E_NOT_CURRENT_MASTER 0x09 TTCAN Controller transmits two consecutive reference messages which both have the "'Disc_ bit"' set CAN_TT_E_CONSEQUTIVE_DISC 0x0a Adjustment of global time fails, because external synchronization has been disabled during configuration CAN_TT_E_SYNC_DISABLED 0x0b

requirement SWS_TtCan_00012 [SWS_TtCan_00012] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00013 [SWS_TtCan_00013] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00014 [SWS_TtCan_00014] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTGlobalTime or the parameter Can_TTLocalTime or the parameter Can_TTCycleTime or the pa- rameter Can_TTCycelCount is a NULL pointer.

requirement SWS_TtCan_00016 [SWS_TtCan_00016] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00017 [SWS_TtCan_00017] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00018 [SWS_TtCan_00018] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTMasterState is a NULL pointer.

requirement SWS_TtCan_00020 [SWS_TtCan_00020] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00021 [SWS_TtCan_00021] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00022 [SWS_TtCan_00022] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_PARAM_- POINTER and shall return E_NOT_OK if the parameter Can_TTNTUAct is a NULL pointer.

requirement SWS_TtCan_00024 [SWS_TtCan_00024] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00025 [SWS_TtCan_00025] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00026 [SWS_TtCan_00026] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_PARAM_- POINTER and shall return E_NOT_OK if the parameter Can_TTErrorLevel is a NULL pointer.

requirement SWS_TtCan_00028 [SWS_TtCan_00028] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNextIsGap() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00029 [SWS_TtCan_00029] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNextIsGap() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00031 [SWS_TtCan_00031] 📄 PDF

The function Can_TTSetEndOfGap() shall only take effect if the TTCAN Controller is a potentional Time Master .

requirement SWS_TtCan_00032 [SWS_TtCan_00032] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_TT_E_NOT_- MASTER if the TTCAN Controller is not a potentional Time Master .

requirement SWS_TtCan_00033 [SWS_TtCan_00033] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00034 [SWS_TtCan_00034] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00036 [SWS_TtCan_00036] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- CONSEQUTIVE_DISC if two consecutive reference messages are transmitted wich both have the "`Disc_bit"' set.

requirement SWS_TtCan_00037 [SWS_TtCan_00037] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- SYNC_DISABLED if the adjustment of the Global Time fails, because the external synchronization has been disabled during configuration.

requirement SWS_TtCan_00038 [SWS_TtCan_00038] 📄 PDF

The function Can_TTSetTimeCommand() shall only take ef- fect if the TTCAN Controller is the current Time Master .

requirement SWS_TtCan_00039 [SWS_TtCan_00039] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- NOT_CURRENT_MASTER if the TTCAN Controller is not the current Time Master .

requirement SWS_TtCan_00040 [SWS_TtCan_00040] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00041 [SWS_TtCan_00041] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00043 [SWS_TtCan_00043] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGlobalTimePreset() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00044 [SWS_TtCan_00044] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGlobalTimePreset() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00046 [SWS_TtCan_00046] 📄 PDF

The function Can_TTSetExtClockSyncCommand() shall only take effect if the TTCAN Controller is the current Time Master .

requirement SWS_TtCan_00047 [SWS_TtCan_00047] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_TT_E_NOT_CURRENT_MASTER if the TTCAN Controller is not the current Time Master .

requirement SWS_TtCan_00048 [SWS_TtCan_00048] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00049 [SWS_TtCan_00049] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_E_PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00051 [SWS_TtCan_00051] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNTUAdjust() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00052 [SWS_TtCan_00052] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNTUAdjust() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00057 [SWS_TtCan_00057] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00058 [SWS_TtCan_00058] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00059 [SWS_TtCan_00059] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTClockSpeed or the parameter Can_TTGlobalTimePhase is a NULL pointer.

requirement SWS_TtCan_00061 [SWS_TtCan_00061] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00062 [SWS_TtCan_00062] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeMark() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00064 [SWS_TtCan_00064] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTCancelTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00065 [SWS_TtCan_00065] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTCancelTimeMark() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00067 [SWS_TtCan_00067] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTAckTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00068 [SWS_TtCan_00068] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTAckTimeMark() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00070 [SWS_TtCan_00070] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTEnableTimeMarkIRQ() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00071 [SWS_TtCan_00071] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTEnableTimeMarkIRQ() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00073 [SWS_TtCan_00073] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTDisableTimeMarkIRQ() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00074 [SWS_TtCan_00074] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTDisableTimeMarkIRQ() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00076 [SWS_TtCan_00076] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00077 [SWS_TtCan_00077] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_PARAM_CONTROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00078 [SWS_TtCan_00078] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TT IRQStatus is a NULL pointer.

requirement SWS_TtCan_00082 [SWS_TtCan_00082] 📄 PDF

CanIf_TTApplWatchdogError TtcanIf.h Reports an application watchdog error. CanIf_TTGap TtcanIf.h Reports the occurrence of a gap. CanIf_TTMasterStateChange TtcanIf.h Reports change of the master state between potential and current master. CanIf_TTSevereError TtcanIf.h Reports one of the following errors: • failed to serve appl. watchdog • config error • watch trigger reached CanIf_TTStartOfCycle TtcanIf.h Reports the start of a basic cycle. CanIf_TTTimeDisc TtcanIf.h Reports a time discontinuity. CanIf_TTTimingError TtcanIf.h Reports one of the following errors: • Change of error level • Tx overflow / underflow • Synchronization failed • Init watch trigger

requirement SWS_TtCan_00110 [SWS_TtCan_00110] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

requirement SWS_TtCan_00111 [SWS_TtCan_00111] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_PARAM_CON- TROLLER if the parameter Controller is out of range.

requirement SWS_TtCan_00112 [SWS_TtCan_00112] 📄 PDF

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_PARAM_POINTER and shall return E_NOT_OK if one of the parameter CanId , CanDlc or CanSduPtr is a NULL pointer.

requirement SWS_TtCan_00120 [SWS_TtCan_00120] 📄 PDF

• STARTED -> STOPPED • Triggered by hardware if the TTCAN Controller reaches error level S3 (see TTCAN ISO Specification [1]) • The CanIf module is notified with the function CanIf_TTSevereError after STOPPED state is reached.

requirement SWS_TtCan_00121 [SWS_TtCan_00121] 📄 PDF

After severe error detection, the TTCAN Controller shall transition to the state STOPPED and the Ttcan Driver module shall ensure that the CAN Controller doesn't participate on the network anymore.

requirement SWS_TtCan_00122 [SWS_TtCan_00122] 📄 PDF

After severe error detection, TtcanDrv shall cancel still pend- ing messages without raising a cancellation notification.

requirement SWS_TtCan_00124 [SWS_TtCan_00124] 📄 PDF

Either the function Can_TTMainFunction_IRQ() or an inter- rupt shall call the function CanIf_TTTimingError() with the corresponding event type, when error levels S1 or S2 (see TTCAN ISO Specification [1]) are reached.

requirement SWS_TtCan_00125 [SWS_TtCan_00125] 📄 PDF

Module Header File Imported Type Can Can_GeneralTypes.h Can_IdType TtcanIf.h CanIf_TTErrorLevelEnumType TtcanIf.h CanIf_TTErrorLevelType TtcanIf.h CanIf_TTEventEnumType TtcanIf.h CanIf_TTMasterSlaveModeType TtcanIf.h CanIf_TTMasterStateType TtcanIf.h CanIf_TTSevereErrorEnumType TtcanIf.h CanIf_TTSyncModeEnumType CanIf TtcanIf.h CanIf_TTTimingErrorIRQType Std Std_Types.h Std_ReturnType

requirement SWS_TtCan_00126 [SWS_TtCan_00126] 📄 PDF

Either the function Can_TTMainFunction_IRQ() or an in- terrupt shall call the function CanIf_TTSevereError() with the corresponding event type, when error level S3 (see TTCAN ISO Specification [1]) is reached.

requirement SWS_TtCan_00155 [SWS_TtCan_00155] 📄 PDF

Replaces SWS_Can_00262 : The function Can_SetCon- trollerMode(CAN_CS_STARTED) shall wait for a limited time until the TTCAN Controller has changed to the state SYNCHRONIZING (Compare to SWS_Can_00371 ).

requirement SWS_TtCan_00156 [SWS_TtCan_00156] 📄 PDF

It shall be possible to map all transmit message objects to specific Time Windows (see TTCAN ISO Specification [1]) by configuration (see TTCANIF145_Conf , TTCANIF146_Conf , TTCANIF147_Conf , TTCANIF148_Conf ).

requirement SWS_TtCan_00157 [SWS_TtCan_00157] 📄 PDF

The TT Can Driver module shall reject configurations with par- tition mappings which are not supported by the implementation.

requirement SWS_TtCan_CONSTR_00001 [SWS_TtCan_CONSTR_00001] 📄 PDF

The ECUC partitions referenced by CanTTCon- trollerEcucPartitionRef shall be a subset of the ECUC partitions referenced by CanEcucPartitionRef .

requirement SWS_TtCan_CONSTR_00002 [SWS_TtCan_CONSTR_00002] 📄 PDF

CanTTController and CanTrcvChannel of one communication channel shall all reference the same ECUC partition.

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

Record
AUTOSAR/AP/record/CP_MOD_Ttcan
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Ttcan@rel:R20-11#d15667f8
Content hash
d15667f8
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_TTCANDriver.pdf#nameddest=SWS_TtCan_00090

주제 맵

상세 보기

개요에서 항목을 선택하세요.

서비스

Acknowledges the time mark interrupt by resetting the flag in the interrupt vector register.

void Can_TTAckTimeMark(uint8 Controller);

Cancels the time mark.

void Can_TTCancelTimeMark(uint8 Controller);

Disables the time mark interrupt.

void Can_TTDisableTimeMarkIRQ(uint8 Controller);

Enables the time mark interrupt.

void Can_TTEnableTimeMarkIRQ(uint8 Controller);

Gets the current values for the global, local and cycle time and the cycle count of the controller

void Can_TTGetControllerTime(uint8 Controller, Can_TTTimeType* Can_TTGlobalTime, Can_TTTimeType* Can_TTLocalTime, Can_TTTimeType* Can_TTCycleTime, uint8* Can_TTCycleCount);

Gets the error level. This includes the severity of the error level (S0-S3) and the minimum and maximum value of the message status count.

void Can_TTGetErrorLevel(uint8 Controller, Can_TTErrorLevelType* Can_TTErrorLevel);

Gets the master state. The master state includes the sync mode (sync_off, synchronizing, in_ gap, in_schedule) the master-slave mode (master_off, slave, backup_master, current_master) and the current value for ref trigger offset.

void Can_TTGetMasterState(uint8 Controller, Can_TTMasterStateType* Can_TTMasterState);

Gets the actual value of NTU (network time unit). Together with the local oscillator period, the actual value of NTU can be derived from the actual value of TUR.

void Can_TTGetNTUActual(uint8 Controller, Can_TTTURType* Can_TTTURAct);

Gets the synchronization quality.

void Can_TTGetSyncQuality(uint8 Controller, boolean* Can_TTClockSpeed, boolean* Can_TTGlobalTimePhase);

Gets the IRQ status of the time mark.

void Can_TTGetTimeMarkIRQStatus(uint8 Controller, boolean* Can_TTIRQStatus);

Sets the value of "global time preset".

void Can_TTGlobalTimePreset(uint8 Controller, Can_TTTimeType Can_TTGlobalTimePreset);

Polls the interrupt flags specific to TTCAN

void Can_TTMainFunction_IRQ(void);

Reads received data from the controller by returning the pointer of the CanID, the DLC and the Data of the message in the requested HRH.

void Can_TTReceive(uint8 Controller, uint8 Hrh, Can_IdType* CanId, uint8* CanDlc, uint8* CanSduPtr);

Signals the end of a gap.

void Can_TTSetEndOfGap(uint8 Controller);

Adjusts the NTU (network time unit) according to the value given by "NTU adjust". Together with the local oscillator period, "TUR adjust" can be derived from "NTU adjust".

void Can_TTSetExtClockSyncCommand(uint8 Controller);

Sets the "Next_is_Gap" bit.

void Can_TTSetNextIsGap(uint8 Controller);

Sets the value of "NTU adjust". Together with the local oscillator period, "TUR adjust" can be derived from "NTU adjust".

void Can_TTSetNTUAdjust(uint8 Controller, Can_TTTURType Can_TTTURAdjust);

Adjusts the global time at the beginning of the next basic cycle by the amount of "global time preset"

void Can_TTSetTimeCommand(uint8 Controller);

Sets a new value for the time mark for the given time source.

void Can_TTSetTimeMark(uint8 Controller, Can_TTTimeType Can_TTTimeMark, Can_TTTimeSourceType Can_TTTimeSource);

타입

Error level (S0-S3)

TTCAN error level including min and max values of message status count

Master-Slave Mode

Master state type including sync mode, master-slave mode and current ref trigger offset

Sync mode

Time source

16 bit value representing time values of TTCAN, e.g. cycle, local or global time

요구사항

SWS_TtCan_00004 requirement

TtcanDrv shall provide information from the TTCAN Con- troller about the timing parameters (see [SWS_TtCan_00090]), the synchronization state and the master state (see [SWS_TtCan_00091]).

SWS_TtCan_00005 requirement

TtcanDrv shall provide means to influence the timing pa- rameters of a TTCAN Controller (see [SWS_TtCan_00096], [SWS_TtCan_00097], [SWS_TtCan_00098], [SWS_TtCan_00099]) during runtime, if the TTCAN Con- troller acts as Time Master .

SWS_TtCan_00006 requirement

TtcanDrv shall provide the functionality of a timer, which is based on the time marks of the communication system, provided by the TTCAN Con- troller .

SWS_TtCan_00007 requirement

TtcanDrv shall support event-synchronized communication (see [SWS_TtCan_00094], [SWS_TtCan_00095]) (refer to [1, ISO 11898-4]).

SWS_TtCan_00009 requirement

The events according to Table 7.1 shall be indicated to the ap- plication via TtcanIf .

SWS_TtCan_00010 requirement

Type of error Related error code Error value TTCAN Controller is not a potential time master CAN_TT_E_NOT_MASTER 0x08 TTCAN Controller is not a current time master CAN_TT_E_NOT_CURRENT_MASTER 0x09 TTCAN Controller transmits two consecutive reference messages which both have the "'Disc_ bit"' set CAN_TT_E_CONSEQUTIVE_DISC 0x0a Adjustment of global time fails, because external synchronization has been disabled during configuration CAN_TT_E_SYNC_DISABLED 0x0b

SWS_TtCan_00012 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

SWS_TtCan_00013 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00014 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetControllerTime() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTGlobalTime or the parameter Can_TTLocalTime or the parameter Can_TTCycleTime or the pa- rameter Can_TTCycelCount is a NULL pointer.

SWS_TtCan_00016 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00017 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00018 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetMasterState() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTMasterState is a NULL pointer.

SWS_TtCan_00020 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00021 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00022 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetNTUActual() shall raise the error CAN_E_PARAM_- POINTER and shall return E_NOT_OK if the parameter Can_TTNTUAct is a NULL pointer.

SWS_TtCan_00024 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00025 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00026 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetErrorLevel() shall raise the error CAN_E_PARAM_- POINTER and shall return E_NOT_OK if the parameter Can_TTErrorLevel is a NULL pointer.

SWS_TtCan_00028 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNextIsGap() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00029 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNextIsGap() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00031 requirement

The function Can_TTSetEndOfGap() shall only take effect if the TTCAN Controller is a potentional Time Master .

SWS_TtCan_00032 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_TT_E_NOT_- MASTER if the TTCAN Controller is not a potentional Time Master .

SWS_TtCan_00033 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00034 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetEndOfGap() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00036 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- CONSEQUTIVE_DISC if two consecutive reference messages are transmitted wich both have the "`Disc_bit"' set.

SWS_TtCan_00037 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- SYNC_DISABLED if the adjustment of the Global Time fails, because the external synchronization has been disabled during configuration.

SWS_TtCan_00038 requirement

The function Can_TTSetTimeCommand() shall only take ef- fect if the TTCAN Controller is the current Time Master .

SWS_TtCan_00039 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_TT_E_- NOT_CURRENT_MASTER if the TTCAN Controller is not the current Time Master .

SWS_TtCan_00040 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00041 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeCommand() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00043 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGlobalTimePreset() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

SWS_TtCan_00044 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGlobalTimePreset() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00046 requirement

The function Can_TTSetExtClockSyncCommand() shall only take effect if the TTCAN Controller is the current Time Master .

SWS_TtCan_00047 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_TT_E_NOT_CURRENT_MASTER if the TTCAN Controller is not the current Time Master .

SWS_TtCan_00048 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00049 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetExtClockSyncCommand() shall raise the error CAN_E_PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00051 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNTUAdjust() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00052 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetNTUAdjust() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00057 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00058 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00059 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetSyncQuality() shall raise the error CAN_E_- PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TTClockSpeed or the parameter Can_TTGlobalTimePhase is a NULL pointer.

SWS_TtCan_00061 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00062 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTSetTimeMark() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00064 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTCancelTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00065 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTCancelTimeMark() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00067 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTAckTimeMark() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00068 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTAckTimeMark() shall raise the error CAN_E_PARAM_- CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00070 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTEnableTimeMarkIRQ() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

SWS_TtCan_00071 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTEnableTimeMarkIRQ() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00073 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTDisableTimeMarkIRQ() shall raise the error CAN_E_- UNINIT if the driver is not yet initialized.

SWS_TtCan_00074 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTDisableTimeMarkIRQ() shall raise the error CAN_E_- PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00076 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00077 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_PARAM_CONTROLLER if the parameter Controller is out of range.

SWS_TtCan_00078 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTGetTimeMarkIRQStatus() shall raise the error CAN_- E_PARAM_POINTER and shall return E_NOT_OK if the parameter Can_TT IRQStatus is a NULL pointer.

SWS_TtCan_00082 requirement

CanIf_TTApplWatchdogError TtcanIf.h Reports an application watchdog error. CanIf_TTGap TtcanIf.h Reports the occurrence of a gap. CanIf_TTMasterStateChange TtcanIf.h Reports change of the master state between potential and current master. CanIf_TTSevereError TtcanIf.h Reports one of the following errors: • failed to serve appl. watchdog • config error • watch trigger reached CanIf_TTStartOfCycle TtcanIf.h Reports the start of a basic cycle. CanIf_TTTimeDisc TtcanIf.h Reports a time discontinuity. CanIf_TTTimingError TtcanIf.h Reports one of the following errors: • Change of error level • Tx overflow / underflow • Synchronization failed • Init watch trigger

SWS_TtCan_00110 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_UNINIT if the driver is not yet initialized.

SWS_TtCan_00111 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_PARAM_CON- TROLLER if the parameter Controller is out of range.

SWS_TtCan_00112 requirement

If development error detection for the Ttcan module is en- abled: The function Can_TTReceive() shall raise the error CAN_E_PARAM_POINTER and shall return E_NOT_OK if one of the parameter CanId , CanDlc or CanSduPtr is a NULL pointer.

SWS_TtCan_00120 requirement

• STARTED -> STOPPED • Triggered by hardware if the TTCAN Controller reaches error level S3 (see TTCAN ISO Specification [1]) • The CanIf module is notified with the function CanIf_TTSevereError after STOPPED state is reached.

SWS_TtCan_00121 requirement

After severe error detection, the TTCAN Controller shall transition to the state STOPPED and the Ttcan Driver module shall ensure that the CAN Controller doesn't participate on the network anymore.

SWS_TtCan_00122 requirement

After severe error detection, TtcanDrv shall cancel still pend- ing messages without raising a cancellation notification.

SWS_TtCan_00123 requirement

TtcanDrv shall disable or suppress automatic severe error recovery.

SWS_TtCan_00124 requirement

Either the function Can_TTMainFunction_IRQ() or an inter- rupt shall call the function CanIf_TTTimingError() with the corresponding event type, when error levels S1 or S2 (see TTCAN ISO Specification [1]) are reached.

SWS_TtCan_00125 requirement

Module Header File Imported Type Can Can_GeneralTypes.h Can_IdType TtcanIf.h CanIf_TTErrorLevelEnumType TtcanIf.h CanIf_TTErrorLevelType TtcanIf.h CanIf_TTEventEnumType TtcanIf.h CanIf_TTMasterSlaveModeType TtcanIf.h CanIf_TTMasterStateType TtcanIf.h CanIf_TTSevereErrorEnumType TtcanIf.h CanIf_TTSyncModeEnumType CanIf TtcanIf.h CanIf_TTTimingErrorIRQType Std Std_Types.h Std_ReturnType

SWS_TtCan_00126 requirement

Either the function Can_TTMainFunction_IRQ() or an in- terrupt shall call the function CanIf_TTSevereError() with the corresponding event type, when error level S3 (see TTCAN ISO Specification [1]) is reached.

SWS_TtCan_00154 requirement

Spezifikationsanforderung SWS_TtCan_00154.

SWS_TtCan_00155 requirement

Replaces SWS_Can_00262 : The function Can_SetCon- trollerMode(CAN_CS_STARTED) shall wait for a limited time until the TTCAN Controller has changed to the state SYNCHRONIZING (Compare to SWS_Can_00371 ).

SWS_TtCan_00156 requirement

It shall be possible to map all transmit message objects to specific Time Windows (see TTCAN ISO Specification [1]) by configuration (see TTCANIF145_Conf , TTCANIF146_Conf , TTCANIF147_Conf , TTCANIF148_Conf ).

SWS_TtCan_00157 requirement

The TT Can Driver module shall reject configurations with par- tition mappings which are not supported by the implementation.

SWS_TtCan_00726 requirement

These requirements are not applicable to this specification.

The ECUC partitions referenced by CanTTCon- trollerEcucPartitionRef shall be a subset of the ECUC partitions referenced by CanEcucPartitionRef .

CanTTController and CanTrcvChannel of one communication channel shall all reference the same ECUC partition.