Autosar Sws Ttcaninterface
Autosar Sws Ttcaninterface
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
1 Introduction and functional overview 7
3 Related documentation 11
3.1 Input documents & related standards and norms . . . . . . . . . . . . 11
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and assumptions 12
7 Functional specification 16
7.1 General Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.2 TTCAN Interface State Machine . . . . . . . . . . . . . . . . . . . . . . 16
7.3 TTCAN Job List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.4 TTCAN Job List Execution Function . . . . . . . . . . . . . . . . . . . . 17
7.5 Data communication via TTCAN . . . . . . . . . . . . . . . . . . . . . . 18
7.6 TTCAN Controller mode . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.7 Error classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 20
7.7.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 20
8 API specification 21
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8.2.1 CanIf_TTTimeType . . . . . . . . . . . . . . . . . . . . . . . 21
8.2.2 CanIf_TTMasterSlaveModeType . . . . . . . . . . . . . . . . 22
8.2.3 CanIf_TTSyncModeEnumType . . . . . . . . . . . . . . . . . 22
8.2.4 CanIf_TTMasterStateType . . . . . . . . . . . . . . . . . . . 22
8.2.5 CanIf_TTErrorLevelEnumType . . . . . . . . . . . . . . . . . 23
8.2.6 CanIf_TTErrorLevelType . . . . . . . . . . . . . . . . . . . . 23
8.2.7 CanIf_TTSevereErrorEnumType . . . . . . . . . . . . . . . . 24
8.2.8 CanIf_TTTimeSourceType . . . . . . . . . . . . . . . . . . . 24
8.2.9 CanIf_TTEventEnumType . . . . . . . . . . . . . . . . . . . . 24
8.2.10 CanIf_TTTimingErrorIRQType . . . . . . . . . . . . . . . . . 25
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.3.1 CanIf_TTGetControllerTime . . . . . . . . . . . . . . . . . . 25
8.3.2 CanIf_TTGetMasterState . . . . . . . . . . . . . . . . . . . . 26
8.3.3 CanIf_TTGetNTUActual . . . . . . . . . . . . . . . . . . . . . 27
8.3.4 CanIf_TTGetErrorLevel . . . . . . . . . . . . . . . . . . . . . 28
8.3.5 CanIf_TTSetNextIsGap . . . . . . . . . . . . . . . . . . . . . 29
8.3.6 CanIf_TTSetEndOfGap . . . . . . . . . . . . . . . . . . . . . 30
8.3.7 CanIf_TTSetTimeCommand . . . . . . . . . . . . . . . . . . 31
8.3.8 CanIf_TTGlobalTimePreset . . . . . . . . . . . . . . . . . . . 31
8.3.9 CanIf_TTSetExtClockSyncCommand . . . . . . . . . . . . . 32
8.3.10 CanIf_TTSetNTUAdjust . . . . . . . . . . . . . . . . . . . . . 33
8.4 Optional Function definitions . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4.1 CanIf_TTJobListExec_<Controller> . . . . . . . . . . . . . . 34
8.4.2 CanIf_TTGetSyncQuality . . . . . . . . . . . . . . . . . . . . 35
8.4.3 CanIf_TTSetTimeMark . . . . . . . . . . . . . . . . . . . . . 36
8.4.4 CanIf_TTCancelTimeMark . . . . . . . . . . . . . . . . . . . 37
8.4.5 CanIf_TTAckTimeMark . . . . . . . . . . . . . . . . . . . . . 37
8.4.6 CanIf_TTEnableTimeMarkIRQ . . . . . . . . . . . . . . . . . 38
8.4.7 CanIf_TTDisableTimeMarkIRQ . . . . . . . . . . . . . . . . . 39
8.4.8 CanIf_TTGetTimeMarkIRQStatus . . . . . . . . . . . . . . . 40
8.5 Scheduled Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.6 Callback Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.6.1 CanIf_TTApplWatchdogError . . . . . . . . . . . . . . . . . . 41
8.6.2 CanIf_TTTimingError . . . . . . . . . . . . . . . . . . . . . . 42
8.6.3 CanIf_TTSevereError . . . . . . . . . . . . . . . . . . . . . . 42
8.6.4 CanIf_TTGap . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
8.6.5 CanIf_TTStartOfCycle . . . . . . . . . . . . . . . . . . . . . . 44
8.6.6 CanIf_TTTimeDisc . . . . . . . . . . . . . . . . . . . . . . . . 45
8.6.7 CanIf_TTMasterStateChange . . . . . . . . . . . . . . . . . . 45
8.7 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.7.1 Mandatory interfaces . . . . . . . . . . . . . . . . . . . . . . 46
8.7.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 47
8.7.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 48
8.7.3.1 <User_TriggerTransmit> . . . . . . . . . . . . . . . . 48
9 Sequence diagrams 50
9.1 Transmission with JobList (TriggerTransmit with decoupled buffer access) 50
9.2 Reception with Joblist . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.3 Job List Execution Function . . . . . . . . . . . . . . . . . . . . . . . . 52
10 Configuration specification 53
10.1 Containers and configuration parameters . . . . . . . . . . . . . . . . . 53
10.1.1 CanIfTTGeneral . . . . . . . . . . . . . . . . . . . . . . . . . 53
10.1.2 CanIfTTDemEventParameterRefs . . . . . . . . . . . . . . . 55
10.1.3 CanIfTTTxFrameTriggering . . . . . . . . . . . . . . . . . . . 56
10.1.4 CanIfTTRxFrameTriggering . . . . . . . . . . . . . . . . . . . 57
Messages, which are configured for Exclusive Time Windows, will be transmit-
ted periodically with every Tx_Trigger configured for this message (Continuous
Transmission).
Messages, which are configured for Arbitrating Time Windows, will be transmit-
ted only once per Transmit Request (Single Shot).
TtcanIf consists of all TTCAN hardware independent tasks, which belong to the
TTCAN communication device drivers of the corresponding ECU. This functionality is
implemented once in TtcanIf, so that underlying TTCAN device drivers only focus
on access and control of the corresponding specific TTCAN hardware device.
TtcanIf fulfils main control flow and data flow requirements of the PDU Router and
upper layer communication modules of the AUTOSAR COM stack: transmit request
processing, transmit confirmation / receive indication / error notification and start / stop
of a TTCAN Controller and thus waking up / participating on a network. Its data
processing and notification API is based on CAN L-PDUs, whereas the APIs for control
and mode handling provide a TTCAN Controller related view.
In case of transmit requests TtcanIf completes the L-PDU transmission with corre-
sponding parameters and relays the CAN L-PDU via the appropriate TTCAN Driver
to the TTCAN Controller. At reception TtcanIf distributes the received L-PDUs
to the upper layer. The assignment between receive L-PDU and upper layer is stati-
cally configured. At transmit confirmation TtcanIf is responsible for the notification of
upper layers about successful transmission.
TtcanIf provides TTCAN communication abstracted access to the lower layer ser-
vices for control and supervision of the TTCAN network. TtcanIf forwards the status
change requests from the CAN State Manager downwards to the lower layer TTCAN
device drivers, and upwards the lower layer events are forwarded by TtcanIf to e.g.
the corresponding NM module.
3 Related documentation
All documents of the referenced CAN Interface document [2] are also valid for this
document.
Bibliography
[1] ISO 11898-4:2004 - Road vehicles - Controller area network (CAN) - Part 4: Time-
triggered communication
[2] Specification of CAN Interface
AUTOSAR_SWS_CANInterface
[3] Layered Software Architecture
AUTOSAR_EXP_LayeredSoftwareArchitecture
[4] Glossary
AUTOSAR_TR_Glossary
[5] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
It’s possible to use dedicated Job List Execution Functions (JLEF) for each
TTCAN Controller.
Whether the optional JLEF runs in a task concept or in an ISR is implementation
specific. Refer to section 7.3.
Additional to the data access through CanIf, as described in [2], TtcanIf can call
a JLEF synchronously to the TTCAN Local Time. This shall ensure the request for
data to be sent occur synchronously to the TTCAN Local Time. Within the JLEF
TtcanIf calls the callback function <UL_TriggerTransmit> of PduR in order to
start the copy operation of PDU data. Additionally the JLEF can be used to read out
received data synchronoulsy to the TTCAN Local Time.
Inside the AUTOSAR BSW architecture the Upper Layers (UL) of TtcanIf are rep-
resented by the PduR, CanNm, CanTp, CanSM, and EcuM.
If the respective upper layer BSW module does not operate synchronously to the
TTCAN Local Time, all occurrences are asynchronous to the code execution of this
BSW module.
6 Requirements Tracing
7 Functional specification
– If it is TRUE, set the interrupt timer to the next job’s start time in order to
invoke the JLEF again and terminate the execution of JLEF
– Otherwise terminate execution of JLEF.
3. If the cycle Time delay compared to the job start time is larger than a maxi-
mum delay (configuration parameter CanIfTTMaxIsrDelay), the execution of
the Job List is considered to be asynchronous to the local time and thus the
following actions are performed:
(a) Call Dem_SetEventStatus(CANIF_TT_E_JLE_SYNC,
DEM_EVENT_STATUS_FAILED)
(b) Add some ’safety margin’ (i.e. some timespan which takes jitter into account)
(c) Search the Job List for the subsequent job, i.e. that job with an invocation
time greater than the current Local Time + safety margin.
(d) Search for the next Job List entry, which is valid for the current Basic
Cycle. If the end of the Job List is reached, wrap around to the next
Basic Cycle and continue the search for that respective Basic Cycle.
(e) If the next job is scheduled for this Basic Cycle:
• Schedule next job, exemplary by using the time mark interrupt
• Otherwise disable timer interrupt
(f) Terminate the execution of JLEF.
Otherwise, the JLEF continues with step 4.
4. Retrieve the sorted list of Communication Operations of the current Job pointed
to by the current job pointer and execute the retrieved communication operations
in the configured order.
5. Search for the next Job List entry, which is valid for the current Basic Cycle.
If the end of the Job List is reached, wrap around to the next Basic Cycle
and continue the search for that respective Basic Cycle.
6. If the next job is scheduled for this Basic cycle set the interrupt timer to this job’s
start time Otherwise disable timer interrupt
7. Call Dem_SetEventStatus(CANIF_TT_E_JLE_SYNC,
DEM_EVENT_STATUS_PASSED)
8. Terminate the execution of JLEF.
8 API specification
In the following sections, the TTCAN specific APIs and types are described.
c()
Note: PduIdType is missing as of ComStack_Types.
8.2.1 CanIf_TTTimeType
[SWS_TtCanIf_00059] d
Name: CanIf_TTTimeType
Type: uint16
Description: 16 bit value representing time values of TTCAN, e.g. cycle, local or global
time
Available TtcanIf.h
via:
c()
8.2.2 CanIf_TTMasterSlaveModeType
[SWS_TtCanIf_00096] d
Name: CanIf_TTMasterSlaveModeType
Type: Enumeration
Range: CANIF_TT_BACKUP_MASTER – Master-Slave Mode: Backup
master
CANIF_TT_CURRENT_MASTER – Master-Slave Mode: Current
master
CANIF_TT_MASTER_OFF – Master-Slave Mode: Master off
CANIF_TT_SLAVE – Master-Slave Mode: Slave
Description: Master-Slave Mode
Available TtcanIf.h
via:
c()
8.2.3 CanIf_TTSyncModeEnumType
[SWS_TtCanIf_00097] d
Name: CanIf_TTSyncModeEnumType
Type: Enumeration
Range: CANIF_TT_IN_GAP – Sync mode: In_Gap
CANIF_TT_IN_SCHEDULE – Sync mode: In_Schedule
CANIF_TT_SYNC_OFF – Sync mode: Sync_Off
CANIF_TT_SYNCHRONIZING – Sync mode: Synchronizing
Description: Sync mode
Available TtcanIf.h
via:
c()
8.2.4 CanIf_TTMasterStateType
[SWS_TtCanIf_00060] d
Name: CanIf_TTMasterStateType
Type: Structure
Element: CanIf_TTMaster masterSlaveMode –
SlaveModeType
c()
8.2.5 CanIf_TTErrorLevelEnumType
[SWS_TtCanIf_00098] d
Name: CanIf_TTErrorLevelEnumType
Type: Enumeration
Range: CANIF_TT_ERROR_S0 – Error level S0: No Error
CANIF_TT_ERROR_S1 – Error level S1: Warning
CANIF_TT_ERROR_S2 – Error level S2: Error
CANIF_TT_ERROR_S3 – Error level S3: Fatal Error
Description: Error level (S0-S3)
Available TtcanIf.h
via:
c()
8.2.6 CanIf_TTErrorLevelType
[SWS_TtCanIf_00061] d
Name: CanIf_TTErrorLevelType
Type: Structure
Element: CanIf_TTErrorLevel errorLevel Error Level (S0-S3)
EnumType
uint8 maxMessageStatus Max value of message sta-
Count tus count (0-7)
uint8 minMessageStatus Min value of message sta-
Count tus count (0-7)
Description: TTCAN error level including min and max values of message status count
Available TtcanIf.h
via:
c()
8.2.7 CanIf_TTSevereErrorEnumType
[SWS_TtCanIf_00137] d
Name: CanIf_TTSevereErrorEnumType
Type: Enumeration
Range: CANIF_TT_CONFIG_ERROR – Event: see ISO11898-4
CANIF_TT_WATCH_TRIGGER_REACH – Event: Watch Trigger reached
ED
CANIF_TT_APPL_WATCHDOG – Event: see ISO 11898-4
Description: Event that causes a severe error
Available TtcanIf.h
via:
c()
8.2.8 CanIf_TTTimeSourceType
[SWS_TtCanIf_00063] d
Name: CanIf_TTTimeSourceType
Type: Enumeration
Range: CANIF_TT_CYCLE_TIME – Time source: Cycle Time
CANIF_TT_GLOBAL_TIME – Time source: Global Time
CANIF_TT_LOCAL_TIME – Time source: Local Time
CANIF_TT_UNDEFINED – Time source: Undefined
Description: Time source of time values in TTCAN
Available TtcanIf.h
via:
c()
8.2.9 CanIf_TTEventEnumType
[SWS_TtCanIf_00099] d
Name: CanIf_TTEventEnumType
Type: Enumeration
Range: CANIF_TT_ERROR_LEVEL_CHANGED – Event: Error Level changed
CANIF_TT_INIT_WATCH_TRIGGER – Event: Init Watch Trigger reached
CANIF_TT_NO_ERROR – No error
CANIF_TT_SYNC_FAILED – Event: Sync failed
c()
8.2.10 CanIf_TTTimingErrorIRQType
[SWS_TtCanIf_00064] d
Name: CanIf_TTTimingErrorIRQType
Type: Structure
Element: CanIf_TTErrorLevel errorLevel Current error level
Type
CanIf_TTEventEnum event Event that caused the IRQ
Type
Description: Combines all events that are reported by CanIf_TTTimingError (event
indication and error level)
Available TtcanIf.h
via:
c()
8.3.1 CanIf_TTGetControllerTime
[SWS_TtCanIf_00065] d
Service name: CanIf_TTGetControllerTime
Syntax: Std_ReturnType CanIf_TTGetControllerTime(
uint8 ControllerId,
CanIf_TTTimeType* CanIf_TTGlobalTime,
CanIf_TTTimeType* CanIf_TTLocalTime,
CanIf_TTTimeType* CanIf_TTCycleTime,
uint8* CanIf_TTCycleCount
)
Service ID[hex]: 0x33
Sync/Async: Synchronous
c(SRS_Can_01121)
[SWS_TtCanIf_00101] d The function CanIf_TTGetControllerTime() shall
call Can_TTGetControllerTime(Controller, Can_TTGlobalTime, CanTT-
LocalTime, Can_TTCycleTime, Can_TTCycleCount). c(SRS_Can_01121)
[SWS_TtCanIf_00010] d If parameter Controller of
CanIf_TTGetControllerTime() has an invalid value and if development
error detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTGetControllerTime() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00011] d Caveats of CanIf_TTGetControllerTime(): TtcanIf
has to be initialized before this API service may be called. c()
[SWS_TtCanIf_00066] d If development error detection for TtcanIf is en-
abled: The function CanIf_TTGetControllerTime() shall raise the error
CANIF_E_PARAM_POINTER and shall return E_NOT_OK if one of the parame-
ter CanIf_TTCycleCount, CanIf_TTGlobalTime, CanIf_TTLocalTime and
CanIf_TTCycleTime is a NULL pointer. c()
8.3.2 CanIf_TTGetMasterState
[SWS_TtCanIf_00067] d
Service name: CanIf_TTGetMasterState
Syntax: Std_ReturnType CanIf_TTGetMasterState(
uint8 ControllerId,
CanIf_TTMasterStateType* CanIf_TTMasterState
)
Service ID[hex]: 0x34
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): CanIf_TTMaster Address to store return value: Master state
State
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: 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.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00102] d The function CanIf_TTGetMasterState() shall
call Can_TTGetMasterState(Controller, Can_TTMasterState). c
(SRS_Can_01121)
[SWS_TtCanIf_00012] d If parameter Controller of
CanIf_TTGetMasterState() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTGetMasterState() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00013] d Caveats of CanIf_TTGetMasterState(): TtcanIf has
to be initialized before this API service may be called. c()
[SWS_TtCanIf_00068] d If development error detection for TtcanIf is
enabled: The function CanIf_TTGetMasterState() shall raise the er-
ror CAN_E_PARAM_POINTER and shall return E_NOT_OK if the parameter
CanIf_TTMasterState is a NULL pointer. c()
8.3.3 CanIf_TTGetNTUActual
[SWS_TtCanIf_00069] d
Service name: CanIf_TTGetNTUActual
Syntax: Std_ReturnType CanIf_TTGetNTUActual(
uint8 ControllerId,
float32 CanIf_TTNTUAct
)
Service ID[hex]: 0x35
Sync/Async: Synchronous
c(SRS_Can_01121)
[SWS_TtCanIf_00103] d The function CanIf_TTGetNTUActual() shall call
Can_TTGetNTUActual(Controller, Can_TTTURAct). c(SRS_Can_01121)
[SWS_TtCanIf_00014] d If parameter Controller of CanIf_TTGetNTUActual()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTGetNTUActual()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00015] d Caveats of CanIf_TTGetNTUActual(): TtcanIf has to
be initialized before this API service may be called. c()
8.3.4 CanIf_TTGetErrorLevel
[SWS_TtCanIf_00070] d
Service name: CanIf_TTGetErrorLevel
Syntax: Std_ReturnType CanIf_TTGetErrorLevel(
uint8 ControllerId,
CanIf_TTErrorLevelType* CanIf_TTErrorLevel
)
Service ID[hex]: 0x36
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller from which the error level shall be re-
trieved
Parameters (inout): None
Parameters (out): CanIf_TTErrorLevel Address to store return value: Error level
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: 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.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00104] d The function CanIf_TTGetErrorLevel() shall
call Can_TTGetErrorLevel(Controller, Can_TTErrorLevel). c
(SRS_Can_01121)
[SWS_TtCanIf_00016] d If parameter Controller of CanIf_TTGetErrorLevel()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTGetErrorLevel()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00017] d Caveats of CanIf_TTGetErrorLevel(): TtcanIf has to
be initialized before this API service may be called. c()
[SWS_TtCanIf_00071] d If development error detection for TtcanIf is enabled: The
function CanIf_TTGetErrorLevel() shall raise the error CAN_E_PARAM_POINTER
and shall return E_NOT_OK if the parameter CanIf_TTErrorLevel is a NULL pointer.
c()
8.3.5 CanIf_TTSetNextIsGap
[SWS_TtCanIf_00072] d
Service name: CanIf_TTSetNextIsGap
Syntax: Std_ReturnType CanIf_TTSetNextIsGap(
uint8 ControllerId
)
Service ID[hex]: 0x37
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Sets the "Next_is_Gap" bit.
Available via: TtcanIf.h
c(SRS_Can_01121)
8.3.6 CanIf_TTSetEndOfGap
[SWS_TtCanIf_00073] d
Service name: CanIf_TTSetEndOfGap
Syntax: Std_ReturnType CanIf_TTSetEndOfGap(
uint8 ControllerId
)
Service ID[hex]: 0x38
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Signals the end of a gap.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00106] d The function CanIf_TTSetEndOfGap() shall call
Can_TTSetNextIsGap(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00020] d If parameter Controller of CanIf_TTSetEndOfGap()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTSetEndOfGap()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00021] d Caveats of CanIf_TTSetEndOfGap(): TtcanIf has to be
initialized before this API service may be called. c()
8.3.7 CanIf_TTSetTimeCommand
[SWS_TtCanIf_00074] d
Service name: CanIf_TTSetTimeCommand
Syntax: Std_ReturnType CanIf_TTSetTimeCommand(
uint8 ControllerId
)
Service ID[hex]: 0x39
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Adjusts the global time at the beginning of the next basic cycle by the
amount of "global time preset"
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00107] d The function CanIf_TTSetTimeCommand() shall call
Can_TTSetTimeCommand(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00022] d If parameter Controller of
CanIf_TTSetTimeCommand() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTSetTimeCommand() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00023] d Caveats of CanIf_TTSetTimeCommand(): TtcanIf has
to be initialized before this API service may be called. c()
8.3.8 CanIf_TTGlobalTimePreset
[SWS_TtCanIf_00075] d
Service name: CanIf_TTGlobalTimePreset
Syntax: Std_ReturnType CanIf_TTGlobalTimePreset(
uint8 ControllerId,
CanIf_TTTimeType CanIf_TTGlobalTimePreset
)
Service ID[hex]: 0x3a
Sync/Async: Synchronous
Reentrancy: Non Reentrant
c(SRS_Can_01121)
[SWS_TtCanIf_00108] d The function CanIf_TTGlobalTimePreset() shall
call Can_TTGlobalTimePreset(Controller, Can_TTGlobalTimePreset). c
(SRS_Can_01121)
[SWS_TtCanIf_00024] d If parameter Controller of
CanIf_TTGlobalTimePreset() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTGlobalTimePreset() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00025] d Caveats of CanIf_TTGlobalTimePreset(): TtcanIf
has to be initialized before this API service may be called. c()
8.3.9 CanIf_TTSetExtClockSyncCommand
[SWS_TtCanIf_00076] d
Service name: CanIf_TTSetExtClockSyncCommand
Syntax: Std_ReturnType CanIf_TTSetExtClockSyncCommand(
uint8 ControllerId
)
Service ID[hex]: 0x3b
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: 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".
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00109] d The function CanIf_TTSetExtClockSyncCommand()
shall call Can_TTSetExtClockSyncCommand(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00026] d If parameter Controller of
CanIf_TTSetExtClockSyncCommand() has an invalid value and if develop-
ment error detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTSetExtClockSyncCommand() shall report development error
code CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00027] d Caveats of CanIf_TTSetExtClockSyncCommand():
TtcanIf has to be initialized before this API service may be called. c()
8.3.10 CanIf_TTSetNTUAdjust
[SWS_TtCanIf_00077] d
Service name: CanIf_TTSetNTUAdjust
Syntax: Std_ReturnType CanIf_TTSetNTUAdjust(
uint8 ControllerId,
float32 CanIf_TTNTUAdjust
)
Service ID[hex]: 0x3c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
CanIf_TTNTUAdjust New value for "NTU adjust".
Value is given in microseconds.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Sets the value of "NTU adjust".
Together with the local oscillator period, "TUR adjust" can be derived
from "NTU adjust".
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00110] d The function CanIf_TTSetNTUAdjust() shall call
Can_TTSetNTUAdjust(Controller, Can_TTNTUAdjust). c(SRS_Can_01121)
[SWS_TtCanIf_00028] d If parameter Controller of CanIf_TTSetNTUAdjust()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTSetNTUAdjust()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00029] d Caveats of CanIf_TTSetNTUAdjust(): TtcanIf has to
be initialized before this API service may be called. c()
8.4.1 CanIf_TTJobListExec_<Controller>
[SWS_TtCanIf_00079] d
Service name: CanIf_TTJobListExec_<Controller>
Syntax: void CanIf_TTJobListExec_<Controller>(
void
)
Service ID[hex]: 0x50
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters (inout): None
Parameters (out): None
Return value: None
Description: Processes the job list of the TTCAN controller <Controller>.
Available via: TtcanIf.h
c(SRS_TtCan_41011)
[SWS_TtCanIf_00032] d The function CanIf_TTJobListExec_<Controller>()
shall exist once per TTCAN Controller, which use a Job List. c
(SRS_TtCan_41011)
[SWS_TtCanIf_00033] d The function name of each instance of
CanIf_TTJobListExec_<Controller>() shall contain the index of the re-
spective TTCAN Controller. c(SRS_TtCan_41011)
8.4.2 CanIf_TTGetSyncQuality
[SWS_TtCanIf_00080] d
Service name: CanIf_TTGetSyncQuality
Syntax: Std_ReturnType CanIf_TTGetSyncQuality(
uint8 ControllerId,
boolean* CanIf_TTClockSpeed,
boolean* CanIf_TTGlobalTimePhase
)
Service ID[hex]: 0x47
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): CanIf_TTClock Address to store return value: True if the synchro-
Speed nization deviation is smaller than the "Synchroniza-
tion deviation limit"
CanIf_TTGlobal Address to store return value: True if the the global
TimePhase time is in phase with the time master.
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Gets the synchronization quality.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00112] d The function CanIf_TTGetSyncQuality()
shall call Can_TTGetSyncQuality(Controller, Can_TTClockSpeed,
Can_TTGlobalTimePhase). c(SRS_Can_01121)
[SWS_TtCanIf_00035] d If parameter Controller of
CanIf_TTGetSyncQuality() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTGetSyncQuality() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00036] d Caveats of CanIf_TTGetSyncQuality(): TtcanIf has
to be initialized before this API service may be called. c()
8.4.3 CanIf_TTSetTimeMark
[SWS_TtCanIf_00082] d
Service name: CanIf_TTSetTimeMark
Syntax: Std_ReturnType CanIf_TTSetTimeMark(
uint8 ControllerId,
CanIf_TTTimeType CanIf_TTTimeMark,
CanIf_TTTimeSourceType CanIf_TTTimeSource
)
Service ID[hex]: 0x48
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
CanIf_TTTimeMark Gives the value of the time mark to be set.
CanIf_TTTime Defines the time source for the time mark to be set.
Source
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Sets a new value for the time mark for the given time source.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00113] d The function CanIf_TTSetTimeMark()
shall call Can_TTSetTimeMark(Controller, Can_TTTimeMark,
Can_TTTimeSource). c(SRS_Can_01121)
[SWS_TtCanIf_00037] d If parameter Controller of CanIf_TTSetTimeMark()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTSetTimeMark()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00038] d Caveats of CanIf_TTSetTimeMark(): TtcanIf has to be
initialized before this API service may be called. c()
8.4.4 CanIf_TTCancelTimeMark
[SWS_TtCanIf_00083] d
Service name: CanIf_TTCancelTimeMark
Syntax: Std_ReturnType CanIf_TTCancelTimeMark(
uint8 ControllerId
)
Service ID[hex]: 0x49
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Cancels the time mark.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00114] d The function CanIf_TTCancelTimeMark() shall call
Can_TTCancelTimeMark(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00039] d If parameter Controller of
CanIf_TTCancelTimeMark() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTCancelTimeMark() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00040] d Caveats of CanIf_TTCancelTimeMark(): TtcanIf has
to be initialized before this API service may be called. c()
8.4.5 CanIf_TTAckTimeMark
[SWS_TtCanIf_00084] d
Service name: CanIf_TTAckTimeMark
Syntax: Std_ReturnType CanIf_TTAckTimeMark(
uint8 ControllerId
)
Service ID[hex]: 0x4a
Sync/Async: Synchronous
Reentrancy: Non Reentrant
c(SRS_Can_01121)
[SWS_TtCanIf_00115] d The function CanIf_TTAckTimeMark() shall call
Can_TTAckTimeMark(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00041] d If parameter Controller of CanIf_TTAckTimeMark()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), the function CanIf_TTAckTimeMark()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
[SWS_TtCanIf_00042] d Caveats of CanIf_TTAckTimeMark(): TtcanIf has to be
initialized before this API service may be called. c()
8.4.6 CanIf_TTEnableTimeMarkIRQ
[SWS_TtCanIf_00085] d
Service name: CanIf_TTEnableTimeMarkIRQ
Syntax: Std_ReturnType CanIf_TTEnableTimeMarkIRQ(
uint8 ControllerId
)
Service ID[hex]: 0x4b
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Enables the time mark interrupt.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00116] d The function CanIf_TTEnableTimeMarkIRQ() shall call
Can_TTEnableTimeMarkIRQ(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00043] d If parameter Controller of
CanIf_TTEnableTimeMarkIRQ() has an invalid value and if development
error detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the
function CanIf_TTEnableTimeMarkIRQ() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00044] d Caveats of CanIf_TTEnableTimeMarkIRQ(): TtcanIf
has to be initialized before this API service may be called. c()
8.4.7 CanIf_TTDisableTimeMarkIRQ
[SWS_TtCanIf_00086] d
Service name: CanIf_TTDisableTimeMarkIRQ
Syntax: Std_ReturnType CanIf_TTDisableTimeMarkIRQ(
uint8 ControllerId
)
Service ID[hex]: 0x4c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Disables the time mark interrupt.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00117] d The function CanIf_TTDisableTimeMarkIRQ() shall call
Can_TTDisableTimeMarkIRQ(Controller). c(SRS_Can_01121)
[SWS_TtCanIf_00045] d If parameter Controller of
CanIf_TTDisableTimeMarkIRQ() has an invalid value and if development
error detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the func-
tion CanIf_TTDisableTimeMarkIRQ() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
8.4.8 CanIf_TTGetTimeMarkIRQStatus
[SWS_TtCanIf_00087] d
Service name: CanIf_TTGetTimeMarkIRQStatus
Syntax: Std_ReturnType CanIf_TTGetTimeMarkIRQStatus(
uint8 ControllerId,
boolean* CanIf_TTIRQStatus
)
Service ID[hex]: 0x4d
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller
Parameters (inout): None
Parameters (out): CanIf_TTIRQStatus Address to store return value: True if the timer for
the time mark is pending.
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Gets the IRQ status of the time mark.
Available via: TtcanIf.h
c(SRS_Can_01121)
[SWS_TtCanIf_00119] d The function CanIf_TTGetTimeMarkIRQStatus() shall
call Can_TTGetTimeMarkIRQStatus(Controller, Can_TTIRQStatus). c
(SRS_Can_01121)
[SWS_TtCanIf_00047] d If parameter Controller of
CanIf_TTGetTimeMarkIRQStatus() has an invalid value and if development
error detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), the func-
tion CanIf_TTGetTimeMarkIRQStatus() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
[SWS_TtCanIf_00048] d Caveats of CanIf_TTGetTimeMarkIRQStatus():
TtcanIf has to be initialized before this API service may be called. c()
[SWS_TtCanIf_00088] d If development error detection for TtcanIf is en-
abled: The function CanIf_TTGetTimeMarkIRQStatus() shall raise the er-
ror CAN_E_PARAM_POINTER and shall return E_NOT_OK if the parameter
CanIf_IRQStatus is a NULL pointer. c()
8.6.1 CanIf_TTApplWatchdogError
[SWS_TtCanIf_00089] d
Service name: CanIf_TTApplWatchdogError
Syntax: Std_ReturnType CanIf_TTApplWatchdogError(
uint8 ControllerId
)
Service ID[hex]: 0x5b
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller for which the application watchdog error
shall be reported.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Reports an application watchdog error.
Available via: TtcanIf.h
c(SRS_Can_01131)
[SWS_TtCanIf_00050] d If parameter ControllerId of
CanIf_TTApplWatchdogError() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), then the
function CanIf_TTApplWatchdogError() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
8.6.2 CanIf_TTTimingError
[SWS_TtCanIf_00090] d
Service name: CanIf_TTTimingError
Syntax: Std_ReturnType CanIf_TTTimingError(
uint8 ControllerId,
CanIf_TTTimingErrorIRQType CanIf_TTTimingErrorIRQ
)
Service ID[hex]: 0x5c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller for which the timing error shall be re-
ported.
CanIf_TTTiming Type of timing error.
ErrorIRQ
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Reports one of the following errors:
- Change of error level
- Tx overflow / underflow
- Synchronization failed
- Init watch trigger
Available via: TtcanIf.h
c(SRS_Can_01131)
Note: This callback service is called by the CAN Driver module (supporting TTCAN)
and implemented in the CAN Interface module (supporting TTCAN). It is called if er-
ror level S1 or S2 (see [1, ISO 11898-4]) have been detected in the corresponding
controller.
[SWS_TtCanIf_00051] d If parameter ControllerId of CanIf_TTTimingError()
has an invalid value and if development error detection is en-
abled (i.e. CANIF_DEV_ERROR_DETECT equals ON), then the func-
tion CanIf_TTTimingError() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
8.6.3 CanIf_TTSevereError
[SWS_TtCanIf_00122] d
Service name: CanIf_TTSevereError
c(SRS_TtCan_41013)
Note: This callback service is called by the CAN Driver module (supporting TTCAN)
and implemented in the CAN Interface module (supporting TTCAN). It is called if error
level S3 (severe error, see [1, ISO 11898-4]) has been detected in the corresponding
controller.
[SWS_TtCanIf_00123] d If parameter ControllerId of CanIf_TTSevereError()
has an invalid value and if development error detection is en-
abled (i.e. CANIF_DEV_ERROR_DETECT equals ON), then the func-
tion CanIf_TTSevereError() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
8.6.4 CanIf_TTGap
[SWS_TtCanIf_00091] d
Service name: CanIf_TTGap
Syntax: Std_ReturnType CanIf_TTGap(
uint8 ControllerId
)
Service ID[hex]: 0x5d
Sync/Async: Synchronous
Reentrancy: Non Reentrant
c(SRS_Can_01131)
[SWS_TtCanIf_00052] d If parameter ControllerId of CanIf_TTGap()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), then the function CanIf_TTGap()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
8.6.5 CanIf_TTStartOfCycle
[SWS_TtCanIf_00092] d
Service name: CanIf_TTStartOfCycle
Syntax: Std_ReturnType CanIf_TTStartOfCycle(
uint8 ControllerId,
uint8 CanIf_TTCycleCount
)
Service ID[hex]: 0x5e
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller for which the start of cycle shall be re-
ported.
CanIf_TTCycle Cycle count value for the cycle that is started
Count
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Reports the start of a basic cycle.
Available via: TtcanIf.h
c(SRS_Can_01131)
8.6.6 CanIf_TTTimeDisc
[SWS_TtCanIf_00093] d
Service name: CanIf_TTTimeDisc
Syntax: Std_ReturnType CanIf_TTTimeDisc(
uint8 ControllerId
)
Service ID[hex]: 0x5f
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller for which the time discontinuity shall be
reported.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Reports a time discontinuity.
Available via: TtcanIf.h
c(SRS_Can_01131)
[SWS_TtCanIf_00054] d If parameter ControllerId of CanIf_TTTimeDisc()
has an invalid value and if development error detection is enabled (i.e.
CANIF_DEV_ERROR_DETECT equals ON), then the function CanIf_TTTimeDisc()
shall report development error code CANIF_E_PARAM_CONTROLLER to the
Det_ReportError service of the DET module. c()
8.6.7 CanIf_TTMasterStateChange
[SWS_TtCanIf_00094] d
Service name: CanIf_TTMasterStateChange
Syntax: Std_ReturnType CanIf_TTMasterStateChange(
uint8 ControllerId,
CanIf_TTMasterStateType CanIf_TTMasterState
)
Service ID[hex]: 0x60
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN
controller for which the master state change shall be
reported.
CanIf_TTMaster Master state including sync mode, master-slave
State mode and current ref trigger offset
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Function successful
E_NOT_OK: Development error occurred
Description: Reports change of the master state between potential and current mas-
ter.
Available via: TtcanIf.h
c(SRS_Can_01131)
[SWS_TtCanIf_00055] d If parameter ControllerId of
CanIf_TTMasterStateChange() has an invalid value and if development er-
ror detection is enabled (i.e. CANIF_DEV_ERROR_DETECT equals ON), then the
function CanIf_TTMasterStateChange() shall report development error code
CANIF_E_PARAM_CONTROLLER to the Det_ReportError service of the DET
module. c()
c()
c()
8.7.3.1 <User_TriggerTransmit>
[SWS_TtCanIf_00058] d
Service name: <User_TriggerTransmit>
Syntax: Std_ReturnType <User_TriggerTransmit>(
PduIdType TxPduId,
PduInfoType* PduInfoPtr
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId ID of the SDU that is requested to be transmitted.
Parameters (inout): PduInfoPtr Contains a pointer to a buffer (SduDataPtr) to where
the SDU data shall be copied, and the available
buffer size in SduLengh.
On return, the service will indicate the length of the
copied SDU data in SduLength.
Parameters (out): None
Return value: Std_ReturnType E_OK: SDU has been copied and SduLength indi-
cates the number of copied bytes.
E_NOT_OK: No SDU data has been copied. PduIn-
foPtr must not be used since it may contain a NULL
pointer or point to invalid data.
Description: Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfoPtr-
>SduLength. If it fits, it shall copy its data into the buffer provided by
PduInfoPtr->SduDataPtr and update the length of the actual copied data
in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing
PduInfoPtr.
Available via: <none>
c()
When calling the PduR, this function has to be named
<User_TriggerTransmit>().
This API service of an upper layer BSW module <User_> (e.g. PduR) is called by
TtcanIf to request from this upper layer BSW module that the PDU with index Tx-
PduId has to be copied to the location in a temporary L-SDU buffer of TtcanIf to
which this part of PduInfoPtr points.
[SWS_TtCanIf_00144] d If during JLEF <User_TriggerTransmit>() returns
E_NOT_OK, TtcanIf shall not call Can_Write() afterwards (see Figure 9.1).
Figure 9.1 shows only the case when <User_TriggerTransmit>() returns E_OK.
c()
Reason for [SWS_TtCanIf_00144]: It is possible that e.g. the PDU is not available in
COM module. This may be due to a stopped PDU group in COM module. Caveats of
<User_TriggerTransmit>(): This API service is called during the execution of the
TTCAN JLEF.
9 Sequence diagrams
The following sequence diagrams show the interactions of TtcanIf additional to the
CAN Interface.
CanIf_Transmit()
CanIf_TTJobListExec_<Controller>()
<UL_TriggerTransmit>(Std_ReturnType,
PduInfoType*)
TtcanIf_JobListExec_<Controller>()
Figure 9.1: CAN Interface Time Triggered transmission with Job List
CanIf_TTJobListExec_<Controller>()
Can_TTReceive()
[CAN L-PDU ID was found]: DLC Check (optional)
Copy_Data()
Copy_Data()
<User_RxIndication>()
CanIf_TTJobListExec_<Controller>()
Figure 9.2: CAN Interface Time Triggered reception with Job List
Figure 9.3: CAN Interface Time Triggered Job List Execution Function (JLEF)
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. For general information about the definition of containers and param-
eters, refer to the [5, chapter 10.1 "Introduction to configuration specification" in
SWS_BSWGeneral].
section 10.1 specifies the structure (containers) and the parameters of TtcanIf.
section 10.2 specifies published information of TtcanIf.
CanIfTTMaxIsrDelay:
+parameter EcucIntegerParamDef
min = 0
max = 0xFFFF
+subContainer CanIfTTDemEventParameterRefs:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfSupportTTCAN:
+parameter
EcucBooleanParamDef
+reference
defaultValue = FALSE
CANIF_TT_E_JLE_SYNC: EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true
+destination
DemEventId:
DemEventParameter: EcucIntegerParamDef
EcucParamConfContainerDef +parameter
max = 65535
upperMultiplicity = 65535 min = 1
lowerMultiplicity = 1 symbolicNameValue = true
10.1.1 CanIfTTGeneral
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfTTDemEvent 0..1 Container for the references to DemEventParameter
ParameterRefs elements which shall be invoked using the API
Dem_SetEventStatus in case the corresponding error
occurs. The EventId is taken from the referenced
DemEventParameter’s DemEventId symbolic value. The
standardized errors are provided in this container and
can be extended by vendor-specific error references.
10.1.2 CanIfTTDemEventParameterRefs
No Included Containers
10.1.3 CanIfTTTxFrameTriggering
CanIfTxPduCfg: CanIfTTTxFrameTriggering:
EcucParamConfContainerDef +reference CanIfTTTxHwObjectTriggerIdRef:
EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0 upperMultiplicity = 1
upperMultiplicity = * lowerMultiplicity = 0
+subContainer
+destination
CanTTHardwareObjectTrigger:
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+parameter +parameter
CanIfTTTxJoblistTimeMark: CanTTHardwareObjectTriggerId:
EcucIntegerParamDef EcucIntegerParamDef
min = 0 max = 63
max = 0xFFFF min = 0
lowerMultiplicity = 0 symbolicNameValue = true
upperMultiplicity = 1
No Included Containers
10.1.4 CanIfTTRxFrameTriggering
CanIfRxPduCfg: CanIfTTRxFrameTriggering:
EcucParamConfContainerDef EcucParamConfContainerDef
+subContainer
+destination
CanTTHardwareObjectTrigger:
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+parameter +parameter
CanTTRxJoblistTimeMark: CanTTHardwareObjectTriggerId:
EcucIntegerParamDef EcucIntegerParamDef
min = 0 max = 63
max = 0xFFFF min = 0
lowerMultiplicity = 0 symbolicNameValue = true
upperMultiplicity = 1
No Included Containers