DEENESPTFRRUARHIKOZHNL

CAN Interface (CanIf)

ModulCanIf (CAN Interface)
BSW-Modul-ID60
Standard-Header#include "CanIf.h"
SWS-SpezifikationAUTOSAR_SWS_CANInterface.pdf
ClusterCAN

Module guideAI-GENERATED

Mediates CAN messages and mode control hardware-independently between CAN drivers and the communication stack.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: a6221da93ef5 Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Mediates CAN messages and mode control hardware-independently between CAN drivers and the communication stack.

CanIf is the hardware-independent layer between CAN drivers or transceivers and the upper communication modules. It maps transmit requests to Can_Write(), buffers when hardware is occupied, and forwards confirmations and filtered receptions to configured callbacks [SWS_CANIF_00318]. It controls controller and transceiver modes on behalf of CanSm and reports back BusOff and mode changes. PDU channel modes switch the transmit and receive paths separately. Transmission only takes place if the controller is in CAN_CS_STARTED and the transmit path is enabled [SWS_CANIF_00317].

The CAN Interface (CanIf) handles all hardware-independent tasks of CAN communication. These include transmit requests, confirmations, receive indications, error notifications, as well as starting and stopping CAN controllers SWS CanIf p. 13. CanIf accesses hardware buffers only via CanDrv services [SWS_CANIF_00023]. It addresses controllers and transceivers of multiple drivers via abstract IDs [SWS_CANIF_00653]. The configuration defines which callbacks are invoked in PduR, CanNm, CanTp, CanSm, or EcuM [SWS_CANIF_00011] [SWS_CANIF_00724].

kontext ul Obere Schichten PduR, CanNm, CanTp, J1939Tp, J1939Nm, CanTSyn, Xcp, CDD canif CanIf ul->canif CanIf_Transmit() CanIf_SetPduMode() CanIf_ReadRxPduData() cansm CanSm / CDD cansm->canif CanIf_SetControllerMode() CanIf_SetTrcvMode() ecum EcuM / Integrationscode ecum->canif CanIf_Init() CanIf_CheckWakeup() CanIf_CheckValidation() canif->ul <User_RxIndication> <User_TxConfirmation> <User_TriggerTransmit> canif->cansm <User_ControllerBusOff> <User_ControllerModeIndication> <User_TrcvModeIndication> canif->ecum <User_ValidateWakeupEvent> can CAN driver (Can) one or more instances canif->can Can_Write() Can_SetControllerMode() Can_CheckWakeup() trcv CAN-Transceiver-Treiber (CanTrcv) canif->trcv CanTrcv_SetOpMode() CanTrcv_CheckWakeup() det Det canif->det Det_ReportError() Det_ReportRuntimeError() idsm IdsM canif->idsm Sicherheitsereignisse mirror Bus Mirroring canif->mirror Mirror_ReportCanFrame() can->canif CanIf_RxIndication() CanIf_TxConfirmation() CanIf_ControllerBusOff() CanIf_ControllerModeIndication() trcv->canif CanIf_TrcvModeIndication()

Context diagram: CanIf between upper communication modules, mode management, and the drivers for controllers and transceivers. Sources: [SWS_CANIF_00012], [SWS_CANIF_00358], SWS CanIf p. 21

EcuM initializes CanIf with CanIf_Init(). After that, each channel is set to CANIF_OFFLINE [SWS_CANIF_00864], and until then, services reject with E_NOT_OK [SWS_CANIF_00661]. The controller start via CanIf_SetControllerMode() runs asynchronously. Completion is reported by CanIf_ControllerModeIndication(), which CanIf forwards to CanSm [SWS_CANIF_00003] [SWS_CANIF_00711]. Only after that does CanIf_SetPduMode() accept requests [SWS_CANIF_00874]. The PDU channel modes switch transmit and receive paths separately. Controller events such as SLEEP, STOPPED, or BusOff forcibly set them [SWS_CANIF_00865] [SWS_CANIF_00866].

pdumodi cluster_offline OFFLINE (Oberzustand) start off CANIF_OFFLINE kein Senden, kein Empfang start->off CanIf_Init() txoff CANIF_TX_OFFLINE reception only off->txoff CAN_CS_STOPPED / BusOff on CANIF_ONLINE transmission and reception off->on CanIf_SetPduMode(CANIF_ONLINE) txoff->off CAN_CS_SLEEP txoff->on CanIf_SetPduMode(CANIF_ONLINE) txact CANIF_TX_OFFLINE_ACTIVE reception, transmission confirmed immediately txact->off CAN_CS_SLEEP txact->txoff CAN_CS_STOPPED / BusOff txact->on CanIf_SetPduMode(CANIF_ONLINE) on->off CanIf_SetPduMode(CANIF_OFFLINE) or CAN_CS_SLEEP on->txoff CanIf_SetPduMode(CANIF_TX_OFFLINE) or CAN_CS_STOPPED / BusOff on->txact CanIf_SetPduMode(CANIF_TX_OFFLINE_ACTIVE) hinweis CanIf_SetPduMode() is only accepted with controller in CAN_CS_STARTED; a selection of transitions is shown

State diagram: The four PDU channel modes and their transitions triggered by CanIf_SetPduMode() and controller events. Sources: [SWS_CANIF_00137], [SWS_CANIF_00866], SWS CanIf Fig. 7.8 p. 61

During transmission, CanIf_Transmit() calls Can_Write() [SWS_CANIF_00318]. If the hardware is occupied, CanIf buffers the L-PDU provided a buffer is configured [SWS_CANIF_00381]. Upon the next confirmation, it transmits the entry with the highest priority [SWS_CANIF_00668]. Received L-PDUs undergo software filtering and length checks before CanIf forwards them to <User_RxIndication> [SWS_CANIF_00389] [SWS_CANIF_00056].

In case of an error, a BusOff sets the channel to CANIF_TX_OFFLINE and is reported to CanSm [SWS_CANIF_00724]. When stopping a controller, CanIf confirms all pending transmit requests with E_NOT_OK [SWS_CANIF_00739]. Parameter and runtime errors are passed to DET [SWS_CANIF_91006] [SWS_CANIF_91007].

Role: hardware-independent hub between CAN drivers and communication stack

The CAN Interface (CanIf) handles all hardware-independent tasks of CAN communication for an ECU. The underlying CAN drivers only handle their specific hardware. CanIf processes transmit requests, transmit confirmations, receive indications, and error notifications, and starts or stops CAN controllers SWS CanIf p. 13. It accesses hardware buffers exclusively via services of CanDrv [SWS_CANIF_00023]. Control services operate with an abstract ControllerId that numbers the controllers of all CanDrv instances consecutively starting from 0 [SWS_CANIF_00653]. The same applies to transceivers with TransceiverId [SWS_CANIF_00655].

Downwards, CanIf combines the APIs of multiple CanTrcv drivers into a uniform interface, but does not contain any transceiver logic itself SWS CanIf p. 21. Even with multiple CanDrvs, each callback exists only once. CanIf identifies the calling driver by ControllerId in Can_HwType SWS CanIf p. 68.

Upwards, CanIf calls configurable callbacks such as <User_TxConfirmation> and <User_RxIndication> [SWS_CANIF_00011] [SWS_CANIF_00012]. The configuration specifies the concrete receiver, such as PduR_CanIfRxIndication [SWS_CANIF_00442] or CanTp_TxConfirmation [SWS_CANIF_00550]. CanIf reports BusOff and mode changes to CanSm or a CDD [SWS_CANIF_00724] [SWS_CANIF_00711]. Wake-up validations go to EcuM [SWS_CANIF_00563].

kontext ul Obere Schichten PduR, CanNm, CanTp, J1939Tp, J1939Nm, CanTSyn, Xcp, CDD canif CanIf ul->canif CanIf_Transmit() CanIf_SetPduMode() CanIf_ReadRxPduData() cansm CanSm / CDD cansm->canif CanIf_SetControllerMode() CanIf_SetTrcvMode() ecum EcuM / Integrationscode ecum->canif CanIf_Init() CanIf_CheckWakeup() CanIf_CheckValidation() canif->ul <User_RxIndication> <User_TxConfirmation> <User_TriggerTransmit> canif->cansm <User_ControllerBusOff> <User_ControllerModeIndication> <User_TrcvModeIndication> canif->ecum <User_ValidateWakeupEvent> can CAN driver (Can) one or more instances canif->can Can_Write() Can_SetControllerMode() Can_CheckWakeup() trcv CAN-Transceiver-Treiber (CanTrcv) canif->trcv CanTrcv_SetOpMode() CanTrcv_CheckWakeup() det Det canif->det Det_ReportError() Det_ReportRuntimeError() idsm IdsM canif->idsm Sicherheitsereignisse mirror Bus Mirroring canif->mirror Mirror_ReportCanFrame() can->canif CanIf_RxIndication() CanIf_TxConfirmation() CanIf_ControllerBusOff() CanIf_ControllerModeIndication() trcv->canif CanIf_TrcvModeIndication()

Context diagram: CanIf mediates between the upper communication modules, mode management (CanSm, EcuM), and the drivers for CAN controllers and transceivers. Error, security, and mirroring messages go to DET, IdsM, and Mirror. Sources: [SWS_CANIF_00011], [SWS_CANIF_00724], [SWS_CANIF_00358], [SWS_CANIF_00905], [SWS_CANIF_00913], SWS CanIf p. 13

The scope of functions depends heavily on the configuration. CanIf_Init() reads, among other things, the number of controllers and the assignment of HTHs/HRHs from configuration containers SWS CanIf p. 22. HTH and HRH are handles to logical transmit and receive objects [SWS_CANIF_00291] [SWS_CANIF_00292]. Many services can be deselected via pre-compile switches, e.g. CanIf_ReadRxPduData() [SWS_CANIF_00330] or CanIf_SetBaudrate() [SWS_CANIF_00871]. If no name is configured for a non-mandatory callback, the call is omitted SWS CanIf p. 133. In contrast, <User_ControllerBusOff> must always be configured [SWS_CANIF_00524].

From initialization to started controller

EcuM calls CanIf_Init() [SWS_CANIF_00001]. In doing so, CanIf initializes variables, flags, and buffers [SWS_CANIF_00085] as well as all transmit L-PDU buffers [SWS_CANIF_00387]. Each channel starts in CANIF_OFFLINE [SWS_CANIF_00864]. The controllers then remain in STOPPED mode, in which neither transmission nor reception takes place. EcuM initializes CanDrv and CanTrcv separately SWS CanIf p. 40. Prior to initialization, all services except CanIf_Init() and CanIf_GetVersionInfo() return E_NOT_OK [SWS_CANIF_00661]. Whoever calls CanIf_DeInit() [SWS_CANIF_91002] must ensure that no transmissions are in progress anymore SWS CanIf p. 81.

Controller start runs asynchronously. CanIf_SetControllerMode() [SWS_CANIF_00003] calls Can_SetControllerMode() [SWS_CANIF_00308]. The driver reports the completed change later with CanIf_ControllerModeIndication() [SWS_CANIF_00699], and CanIf forwards the notification to CanSm [SWS_CANIF_00711]. In polling mode, Can_MainFunction_Mode() detects the change SWS CanIf p. 152. Only in CAN_CS_STARTED does CanIf_SetPduMode() accept requests [SWS_CANIF_00874].

Start controller and enable PDU channelCanSm / obere SchichtCanIfCanCanControllerCanIf_SetControllerMode(ControllerId,CAN_CS_STARTED)Can_SetControllerMode(Controller, Transition)Request transition to STARTE_OKE_OK (Anforderung angenommen)Asynchronous: the transition isNot yet completedloopCan_MainFunction_Mode() bis Moduswechsel erkanntCheck hardware stateCanIf_ControllerModeIndication(ControllerId,CAN_CS_STARTED)<User_ControllerModeIndication>(CanSM_ControllerModeIndication)Use Case: PDU-Pfade freischaltenCanIf_SetPduMode(ControllerId, CANIF_ONLINE)Only permitted in CAN_CS_STARTEDE_OK

Sequence diagram: The start request is acknowledged immediately, but the mode change is indicated only later. Afterward, the PDU paths can be enabled. Sources: [SWS_CANIF_00308], [SWS_CANIF_00711], [SWS_CANIF_00874], SWS CanIf p. 156

PDU channel modes: switching transmit and receive paths separately

Each channel of a controller has a mode of type CanIf_PduModeType [SWS_CANIF_00137]. Upper layers set it with CanIf_SetPduMode() and read it with CanIf_GetPduMode() [SWS_CANIF_00008] [SWS_CANIF_00009]. The modes in detail SWS CanIf p. 58:

  • CANIF_OFFLINE: Transmit requests are rejected with E_NOT_OK and buffers are emptied. Indications and confirmations are suppressed [SWS_CANIF_00073].
  • CANIF_TX_OFFLINE: Only the transmit path is blocked; reception remains active [SWS_CANIF_00489].
  • CANIF_TX_OFFLINE_ACTIVE: Transmit requests are immediately confirmed without being passed to CanDrv [SWS_CANIF_00072].
  • CANIF_ONLINE: Transmit and receive are fully active [SWS_CANIF_00075].

Controller events forcibly set the channel mode. CAN_CS_SLEEP leads to CANIF_OFFLINE [SWS_CANIF_00865]. CAN_CS_STOPPED and BusOff lead to CANIF_TX_OFFLINE [SWS_CANIF_00866].

pdumodi cluster_offline OFFLINE (Oberzustand) start off CANIF_OFFLINE kein Senden, kein Empfang start->off CanIf_Init() txoff CANIF_TX_OFFLINE reception only off->txoff CAN_CS_STOPPED / BusOff on CANIF_ONLINE transmission and reception off->on CanIf_SetPduMode(CANIF_ONLINE) txoff->off CAN_CS_SLEEP txoff->on CanIf_SetPduMode(CANIF_ONLINE) txact CANIF_TX_OFFLINE_ACTIVE reception, transmission confirmed immediately txact->off CAN_CS_SLEEP txact->txoff CAN_CS_STOPPED / BusOff txact->on CanIf_SetPduMode(CANIF_ONLINE) on->off CanIf_SetPduMode(CANIF_OFFLINE) or CAN_CS_SLEEP on->txoff CanIf_SetPduMode(CANIF_TX_OFFLINE) or CAN_CS_STOPPED / BusOff on->txact CanIf_SetPduMode(CANIF_TX_OFFLINE_ACTIVE) hinweis CanIf_SetPduMode() is only accepted with controller in CAN_CS_STARTED; a selection of transitions is shown

State diagram: The four PDU channel modes with transitions triggered by CanIf_SetPduMode() and by controller events. As in the specification, the three restricted modes are grouped into a superstate. Sources: [SWS_CANIF_00864], [SWS_CANIF_00865], [SWS_CANIF_00866], [SWS_CANIF_00874], SWS CanIf Fig. 7.8 p. 61

Transmit path: CanIf_Transmit, buffering, and Trigger Transmit

CanIf_Transmit() [SWS_CANIF_00005] determines the HTH and calls Can_Write(). The passed swPduHandle is returned later in CanIf_TxConfirmation() [SWS_CANIF_00318]. Before that, CanIf sets the two most significant bits of the CanId [SWS_CANIF_00243]. If Can_Write() returns E_OK, this also applies to the transmit request [SWS_CANIF_00162].

A request is accepted only under these conditions:

More recent document sections additionally name CanXL_Write() SWS CanIf p. 87. For R20-11, only Can_Write() is normative.

txentscheidung start aufruf CanIf_Transmit(TxPduId, PduInfoPtr) start->aufruf init CanIf initialisiert? aufruf->init modus Controller CAN_CS_STARTED and transmit path online / offline active? init->modus yes nok1 E_NOT_OK init->nok1 no active Kanal in CANIF_TX_OFFLINE_ACTIVE? modus->active yes nok2 E_NOT_OK (with CANIF_OFFLINE additionally CANIF_E_STOPPED) modus->nok2 no pn PnTxFilter active and no CanIfTxPduPnFilterPdu? active->pn no bestaetigen <User_TxConfirmation> sofort, kein Can_Write() active->bestaetigen yes laenge SduLength larger than global PDU? pn->laenge no nok3 E_NOT_OK pn->nok3 yes trunc CanIfTxPduTruncation aktiviert? laenge->trunc yes write Can_Write(Hth, PduInfo) laenge->write no kuerzen Truncate data to length of global PDU trunc->kuerzen yes nok4 CANIF_E_TXPDU_LENGTH_EXCEEDED, E_NOT_OK trunc->nok4 no kuerzen->write rueck Return value of Can_Write()? write->rueck puffer Buffering active and buffer size > 0? rueck->puffer CAN_BUSY ok E_OK rueck->ok E_OK gleich Same L-PDU already buffered? puffer->gleich yes nok5 E_NOT_OK (L-PDU verloren) puffer->nok5 no frei freies Pufferelement? gleich->frei no ueberschreiben Overwrite buffered instance gleich->ueberschreiben yes ablegen L-PDU in CanIfTxBuffer ablegen frei->ablegen yes nok6 E_NOT_OK frei->nok6 no ueberschreiben->ok ablegen->ok

Activity diagram: How CanIf_Transmit() decides between rejection, simulated confirmation, direct transmission, and buffering. Interpretation: The order of checks is chosen for readability. Sources: [SWS_CANIF_00317], [SWS_CANIF_00382], [SWS_CANIF_00072], [SWS_CANIF_00381], [SWS_CANIF_00837], SWS CanIf Fig. 7.5 p. 51

If Can_Write() reports CAN_BUSY and CanIfPublicTxBuffering is active [SWS_CANIF_00063], CanIf attempts to buffer the L-PDU [SWS_CANIF_00381]. This requires a buffer size greater than zero [SWS_CANIF_00835]. If the same L-PDU is already in the buffer, it is overwritten [SWS_CANIF_00068]. If the buffer is full, a new L-PDU is rejected with E_NOT_OK [SWS_CANIF_00837]. An L-PDU is always located in only one place: in the hardware object or in the CanIf buffer SWS CanIf p. 43.

Upon CanIf_TxConfirmation() [SWS_CANIF_00007], CanIf notifies the responsible user via <User_TxConfirmation> with E_OK [SWS_CANIF_00383]. In the same call, it checks the buffers of the HTH that has become free [SWS_CANIF_00386]. It passes the waiting entry with the highest priority to Can_Write() [SWS_CANIF_00668] [SWS_CANIF_00070]. Upon E_OK, it removes the entry immediately from the buffer [SWS_CANIF_00183]. Newer document locations refer to the callback as LSduR_CanIfTxConfirmation() SWS CanIf p. 157. In R20-11, <User_TxConfirmation> applies.

Transmission with buffering and deferred sending upon confirmationObere Schicht (z. B. PduR)CanIfCanCanControllerUse Case: Transmit request with busy hardwareCanIf_Transmit(TxPduId, PduInfoPtr)Can_Write(Hth, PduInfo)CAN_BUSYL-PDU in CanIfTxBuffer ablegenE_OKUse Case: Confirmation of an earlier requestTransmit-InterruptCanIf_TxConfirmation(CanTxPduId)Check buffer of the vacated HTHaltBuffer filledCan_Write() for entry ofHighest priorityL-PDU in Hardware schreibenE_OKRemove entry immediately from bufferPuffer leerkein weiterer Can_Write()-Aufruf<User_TxConfirmation>(TxPduId, E_OK)

Sequence diagram: When hardware is occupied, the L-PDU is buffered. The confirmation of an earlier request then triggers retransmission from the buffer. Sources: [SWS_CANIF_00381], [SWS_CANIF_00386], [SWS_CANIF_00668], [SWS_CANIF_00183], SWS CanIf p. 138, SWS CanIf p. 143

In triggered transmission, the user does not pass data, but a NULL SduDataPtr [SWS_CANIF_00882]. If the hardware is free, the driver fetches the data via CanIf_TriggerTransmit() [SWS_CANIF_00883]. CanIf forwards the call to <User_TriggerTransmit> and returns its result [SWS_CANIF_00885]. If the hardware is occupied, CanIf buffers only the transmit request [SWS_CANIF_00881]. The CanId of dynamic L-PDUs can be changed with CanIf_SetDynamicTxId() [SWS_CANIF_00189]. Alternatively, it originates from the MetaData [SWS_CANIF_00855] SWS CanIf p. 34.

Trigger TransmitObere SchichtCanIfCanCanControllerCanIf_Transmit(TxPduId, PduInfoPtr)SduDataPtr = NULL, only SduLengthCan_Write(Hth, PduInfo)altHardwareobjekt freiCanIf_TriggerTransmit(TxPduId, PduInfoPtr)<User_TriggerTransmit>(TxPduId, PduInfoPtr)Daten in bereitgestelltenPuffer kopierenE_OKE_OK (return value passed through)L-PDU in Hardware kopierenE_OKE_OKHardwareobjekt belegtCAN_BUSYOnly transmit request inBuffer in CanIfTxBuffer (if possible)

Sequence diagram: In trigger transmit, the driver only fetches the data from the user when the hardware object is free. Sources: [SWS_CANIF_00882], [SWS_CANIF_00885], [SWS_CANIF_00881], SWS CanIf Fig. 9.6 p. 137

Reception path: filtering, checking length, forwarding

After reception, the driver calls CanIf_RxIndication() with Mailbox and data [SWS_CANIF_00006]. Processing takes place in three stages:

rx start aufruf CanIf_RxIndication(Mailbox, PduInfoPtr) start->aufruf init CanIf initialisiert? aufruf->init keine No Rx processing init->keine no filterkonf Software-Filter konfiguriert (BasicCAN-HRH)? init->filterkonf yes filter Software-Filter: CanId akzeptiert? filterkonf->filter yes dlckonf Length check active? filterkonf->dlckonf no verworfen End without indication filter->verworfen no filter->dlckonf yes dlc Length >= configured length? dlckonf->dlc yes akzeptiert L-PDU akzeptiert dlckonf->akzeptiert no dlcfehler Det_ReportRuntimeError() CANIF_E_INVALID_DATA_LENGTH dlc->dlcfehler no dlc->akzeptiert yes neben Depending on configuration: fill receive buffer, set notification status akzeptiert->neben ziel Ziel-Nutzer konfiguriert? akzeptiert->ziel indikation <User_RxIndication>(RxPduId, PduInfoPtr) ziel->indikation yes ende Ende ziel->ende no indikation->ende

Activity diagram: Software filter and length check decide whether a received L-PDU is indicated. Configuration-dependent side effects are shown in parallel. Sources: [SWS_CANIF_00421], [SWS_CANIF_00389], [SWS_CANIF_00168], [SWS_CANIF_00199], [SWS_CANIF_00392], SWS CanIf Fig. 7.6 p. 51

In addition, CanIf provides query services. CanIf_ReadRxPduData() reads data from a dedicated receive buffer [SWS_CANIF_00194] [SWS_CANIF_00198], but is not intended for range reception [SWS_CANIF_00329]. CanIf_ReadTxNotifStatus() and CanIf_ReadRxNotifStatus() reset the status upon reading [SWS_CANIF_00393] [SWS_CANIF_00394]. This "read-and-consume" ensures that at least one event has occurred since the last call SWS CanIf p. 55. CanIf_GetTxConfirmationState() summarizes the confirmations of an entire controller [SWS_CANIF_00734].

Transceiver, wake-up, and partial networking

CanIf forwards the transceiver services directly to the CanTrcv driver. CanIf_SetTrcvMode() calls CanTrcv_SetOpMode() [SWS_CANIF_00358], CanIf_GetTrcvMode() calls CanTrcv_GetOpMode() [SWS_CANIF_00363]. CanIf forwards transceiver mode changes to CanSm [SWS_CANIF_00712].

For wake-up, CanIf_CheckWakeup() queries the controllers and transceivers for the wake-up source [SWS_CANIF_00395] SWS CanIf p. 56. For validation, CanIf stores the first valid reception of a started controller [SWS_CANIF_00286]. CanIf_CheckValidation() then reports it via <User_ValidateWakeupEvent> [SWS_CANIF_00179].

If partial networking is active, a PnTxFilter per controller places an additional layer over the channel modes [SWS_CANIF_00747]. It is activated upon CAN_CS_SLEEP [SWS_CANIF_00749] and deactivated again with the first confirmation or indication [SWS_CANIF_00751] [SWS_CANIF_00896] SWS CanIf p. 70.

Behavior in the event of an error

BusOff: The driver reports the error with CanIf_ControllerBusOff() [SWS_CANIF_00218]. CanIf then sets the channel to CANIF_TX_OFFLINE [SWS_CANIF_00866] and reports the BusOff to CanSm [SWS_CANIF_00724] SWS CanIf Fig. 9.11 p. 147. Recovery is controlled by CanSm via CanIf_SetControllerMode() SWS CanIf p. 160.

BusOff notification and recoveryCanSm (<User_ControllerBusOff>)CanIfCanCanControllerBusOff-ErkennungController if necessarySet to STOPPEDCanIf_ControllerBusOff(ControllerId)Channel to CANIF_TX_OFFLINE,Sendepuffer leerenFor security event reporting:CANIF_SEV_ERRORSTATE_BUSOFF<User_ControllerBusOff>(ControllerId)= CanSM_ControllerBusOff()Use Case: WiederherstellungCanIf_SetControllerMode(ControllerId,CAN_CS_STARTED)Can_SetControllerMode(Controller, Transition)E_OKE_OKCanIf_ControllerModeIndication(ControllerId,CAN_CS_STARTED)<User_ControllerModeIndication>

Sequence diagram: Process from BusOff detection via notification to CanSm to controller restart. Sources: [SWS_CANIF_00218], [SWS_CANIF_00866], [SWS_CANIF_00724], [SWS_CANIF_00918], SWS CanIf p. 154, SWS CanIf p. 160

Controller stopped: Upon entering CAN_CS_STOPPED, CanIf clears the transmit buffers [SWS_CANIF_00485]. It confirms all pending transmit requests with E_NOT_OK [SWS_CANIF_00739]. In this way, every accepted PDU receives a confirmation, positive or negative SWS CanIf p. 54.

Error notifications: CanIf reports invalid parameters as development errors, e.g. CANIF_E_PARAM_CONTROLLERID [SWS_CANIF_00311] [SWS_CANIF_91006]. Runtime errors include CANIF_E_INVALID_DATA_LENGTH [SWS_CANIF_00168] and CANIF_E_STOPPED [SWS_CANIF_00382] [SWS_CANIF_91007]. A lost transmit request is only apparent from the return value or the missing confirmation Error Description p. 22. CanIf reports security events such as CANIF_SEV_ERRORSTATE_PASSIVE to the IdsM [SWS_CANIF_00913] [SWS_CANIF_00917].

Further detailed evidence

AI-generated guide based on specification excerpts. The linked requirements are normative for R20-11; document locations from newer releases are marked as such.

CAN Interface (CanIf)

The CanIf abstracts CAN hardware details and provides uniform access to multiple CAN controllers and transceivers for higher-layer modules (PduR, CanTp, CanNm, CanSM).

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function CanIf_Init [SWS_CANIF_00001] 📄 PDF

void CanIf_Init (const CanIf_ConfigType* ConfigPtr);

This service Initializes internal and external interfaces of the CAN Interface for the further processing.

Implementer's Guide to follow (complexity I3)

function CanIf_DeInit [SWS_CANIF_91002] 📄 PDF

void CanIf_DeInit (void);

De-initializes the CanIf module.

Implementer's Guide to follow (complexity I1)

function CanIf_ReadRxPduData [SWS_CANIF_00194] 📄 PDF

Std_ReturnType CanIf_ReadRxPduData (PduIdType CanIfRxSduId, PduInfoType* CanIfRxInfoPtr);

This service provides the Data Length and the received data of the requested CanIfRxSduId to the calling upper layer.

Implementer's Guide to follow (complexity I2)

function CanIf_ReadTxNotifStatus [SWS_CANIF_00202] 📄 PDF

CanIf_NotifStatusType CanIf_ReadTxNotifStatus (PduIdType CanIfTxSduId);

This service returns the confirmation status (confirmation occurred or not) of a specific static or dynamic CAN Tx L-PDU, requested by the CanIfTxSduId.

Implementer's Guide to follow (complexity I2)

function CanIf_ReadRxNotifStatus [SWS_CANIF_00230] 📄 PDF

CanIf_NotifStatusType CanIf_ReadRxNotifStatus (PduIdType CanIfRxSduId);

This service returns the indication status (indication occurred or not) of a specific CAN Rx L-PDU, requested by the CanIfRxSduId.

Implementer's Guide to follow (complexity I2)

function CanIf_SetTrcvMode [SWS_CANIF_00287] 📄 PDF

Std_ReturnType CanIf_SetTrcvMode (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

This service changes the operation mode of the tansceiver TransceiverId, via calling the corresponding CAN Transceiver Driver service.

Implementer's Guide to follow (complexity I3)

function CanIf_GetTxConfirmationState [SWS_CANIF_00734] 📄 PDF

CanIf_NotifStatusType CanIf_GetTxConfirmationState (uint8 ControllerId);

This service reports, if any TX confirmation has been done for the whole CAN controller since the last CAN controller start.

function CanIf_ClearTrcvWufFlag [SWS_CANIF_00760] 📄 PDF

Std_ReturnType CanIf_ClearTrcvWufFlag (uint8 TransceiverId);

Requests the CanIf module to clear the WUF flag of the designated CAN transceiver.

Implementer's Guide to follow (complexity I2)

function CanIf_CheckTrcvWakeFlag [SWS_CANIF_00761] 📄 PDF

Std_ReturnType CanIf_CheckTrcvWakeFlag (uint8 TransceiverId);

Requests the CanIf module to check the Wake flag of the designated CAN transceiver.

Implementer's Guide to follow (complexity I2)

function CanIf_SetBaudrate [SWS_CANIF_00867] 📄 PDF

Std_ReturnType CanIf_SetBaudrate (uint8 ControllerId, uint16 BaudRateConfigID);

This service shall set the baud rate configuration of the CAN controller. Depending on necessary baud rate modifications the controller might have to reset.

function CanIf_GetControllerRxErrorCounter [SWS_CANIF_91003] 📄 PDF

Std_ReturnType CanIf_GetControllerRxErrorCounter (uint8 ControllerId, uint8* RxErrorCounterPtr);

This service calls the corresponding CAN Driver service for obtaining the Rx error counter of the CAN controller.

function CanIf_GetControllerTxErrorCounter [SWS_CANIF_91004] 📄 PDF

Std_ReturnType CanIf_GetControllerTxErrorCounter (uint8 ControllerId, uint8* TxErrorCounterPtr);

This service calls the corresponding CAN Driver service for obtaining the Tx error counter of the CAN controller.

function CanIf_TriggerTransmit [SWS_CANIF_00883] 📄 PDF

Std_ReturnType CanIf_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

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.

Implementer's Guide to follow (complexity I2)

function CanIf_TxConfirmation [SWS_CANIF_00007] 📄 PDF

void CanIf_TxConfirmation (PduIdType CanTxPduId);

This service confirms a previously successfully processed transmission of a CAN TxPDU.

Implementer's Guide to follow (complexity I3)

function CanIf_RxIndication [SWS_CANIF_00006] 📄 PDF

void CanIf_RxIndication (const Can_HwType* Mailbox, const PduInfoType* PduInfoPtr);

This service indicates a successful reception of a received CAN Rx L-PDU to the CanIf after passing all filters and validation checks.

Implementer's Guide to follow (complexity I3)

function CanIf_ControllerBusOff [SWS_CANIF_00218] 📄 PDF

void CanIf_ControllerBusOff (uint8 ControllerId);

This service indicates a Controller BusOff event referring to the corresponding CAN Controller with the abstract CanIf ControllerId.

Implementer's Guide to follow (complexity I2)

function CanIf_ConfirmPnAvailability [SWS_CANIF_00815] 📄 PDF

void CanIf_ConfirmPnAvailability (uint8 TransceiverId);

This service indicates that the transceiver is running in PN communication mode referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

Implementer's Guide to follow (complexity I2)

function CanIf_ClearTrcvWufFlagIndication [SWS_CANIF_00762] 📄 PDF

void CanIf_ClearTrcvWufFlagIndication (uint8 TransceiverId);

This service indicates that the transceiver has cleared the WufFlag referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

Implementer's Guide to follow (complexity I2)

function CanIf_CheckTrcvWakeFlagIndication [SWS_CANIF_00763] 📄 PDF

void CanIf_CheckTrcvWakeFlagIndication (uint8 TransceiverId);

This service indicates that the check of the transceiver's wake-up flag has been finished by the corresponding CAN transceiver with the abstract CanIf TransceiverId. This indication is used to cope with the asynchronous transceiver communication.

Implementer's Guide to follow (complexity I2)

function CanIf_ControllerModeIndication [SWS_CANIF_00699] 📄 PDF

void CanIf_ControllerModeIndication (uint8 ControllerId, Can_ControllerStateType ControllerMode);

This service indicates a controller state transition referring to the corresponding CAN controller with the abstract CanIf ControllerId.

Implementer's Guide to follow (complexity I2)

function CanIf_TrcvModeIndication [SWS_CANIF_00764] 📄 PDF

void CanIf_TrcvModeIndication (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

This service indicates a transceiver state transition referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

Implementer's Guide to follow (complexity I2)

function CanIf_ControllerErrorStatePassive [SWS_CANIF_91008] 📄 PDF

void CanIf_ControllerErrorStatePassive (uint8 ControllerId, uint16 RxErrorCounter, uint16 TxErrorCounter);

The function derives the ErrorCounterTreshold from RxErrorCounter/ TxErrorCounter values and reports it to the IdsM as security event CANIF_SEV_ERRORSTATE_PASSIVE to the IdsM. It also prepares the context data for the respective security event.

Implementer's Guide to follow (complexity I2)

function CanIf_ErrorNotification [SWS_CANIF_91009] 📄 PDF

void CanIf_ErrorNotification (uint8 ControllerId, Can_ErrorType Can_ErrorType);

The function shall derive the bus error source rx or tx from the parameter CanError and report the bus error as security event CANIF_SEV_TX_ERROR_DETECTED or CANIF_SEV_RX_ ERROR_DETECTED. It also prepares the context data for the respective security event.

Implementer's Guide to follow (complexity I2)

function <User_TriggerTransmit> [SWS_CANIF_00886] 📄 PDF

Std_ReturnType <User_TriggerTransmit> (PduIdType TxPduId, PduInfoType* PduInfoPtr);

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.

Implementer's Guide to follow (complexity I1)

function <User_TxConfirmation> [SWS_CANIF_00011] 📄 PDF

void <User_TxConfirmation> (PduIdType TxPduId, Std_ReturnType result);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

Implementer's Guide to follow (complexity I1)

function <User_RxIndication> [SWS_CANIF_00012] 📄 PDF

void <User_RxIndication> (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Indication of a received PDU from a lower layer communication interface module.

Implementer's Guide to follow (complexity I2)

function <User_ValidateWakeupEvent> [SWS_CANIF_00532] 📄 PDF

void <User_ValidateWakeupEvent> (EcuM_WakeupSourceType sources);

This service indicates if a wake up event initiated from the wake up source (CAN controller or transceiver) after a former request to the CAN Driver or CAN Transceiver Driver module is valid.

Implementer's Guide to follow (complexity I1)

function <User_ControllerBusOff> [SWS_CANIF_00014] 📄 PDF

void <User_ControllerBusOff> (uint8 ControllerId);

This service indicates a bus-off event to the corresponding upper layer module (mainly the CAN State Manager module).

Implementer's Guide to follow (complexity I1)

function <User_ConfirmPnAvailability> [SWS_CANIF_00821] 📄 PDF

void <User_ConfirmPnAvailability> (uint8 TransceiverId);

This service indicates that the CAN transceiver is running in PN communication mode.

Implementer's Guide to follow (complexity I1)

function <User_ClearTrcvWufFlagIndication> [SWS_CANIF_00788] 📄 PDF

void <User_ClearTrcvWufFlagIndication> (uint8 TransceiverId);

This service indicates that the CAN transceiver has cleared the WufFlag. This function is called in CanIf_ClearTrcvWufFlagIndication.

Implementer's Guide to follow (complexity I1)

function <User_CheckTrcvWakeFlagIndication> [SWS_CANIF_00814] 📄 PDF

void <User_CheckTrcvWakeFlagIndication> (uint8 TransceiverId);

This service indicates that the wake up flag in the CAN transceiver is set. This function is called in CanIf_CheckTrcvWakeFlagIndication.

Implementer's Guide to follow (complexity I1)

function <User_ControllerModeIndication> [SWS_CANIF_00687] 📄 PDF

void <User_ControllerModeIndication> (uint8 ControllerId, Can_ControllerStateType ControllerMode);

This service indicates a CAN controller state transition to the corresponding upper layer module (mainly the CAN State Manager module).

Implementer's Guide to follow (complexity I1)

function <User_TrcvModeIndication> [SWS_CANIF_00693] 📄 PDF

void <User_TrcvModeIndication> (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

This service indicates a CAN transceiver state transition to the corresponding upper layer module (mainly the CAN State Manager module).

Implementer's Guide to follow (complexity I1)

type CanIf_ConfigType [SWS_CANIF_00144] 📄 PDF

This type defines a data structure for the post build parameters of the CAN interface for all underlying CAN drivers. At initialization the CanIf gets a pointer to a structure of this type to get access to its configuration data, which is necessary for initialization.

type CanIf_PduModeType [SWS_CANIF_00137] 📄 PDF

The PduMode of a channel defines its transmit or receive activity. Communication direction (transmission and/or reception) of the channel can be controlled separately or together by upper layers.

Implementer's Guide to follow (complexity I2)

type CanIf_NotifStatusType [SWS_CANIF_00201] 📄 PDF

Type CanIf_NotifStatusType.

Implementer's Guide to follow (complexity I2)

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

Record
AUTOSAR/AP/record/CP_MOD_CanIf
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_CanIf@rel:R20-11#66fce523
Content hash
66fce523
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_CANInterface.pdf#nameddest=SWS_CANIF_00001

Initialization and status

CanIf_DeInit function

De-initializes the CanIf module.

void CanIf_DeInit (void);

This service returns the version information of the called CAN Interface module.

void CanIf_GetVersionInfo (Std_VersionInfoType* VersionInfo);
CanIf_Init function

This service Initializes internal and external interfaces of the CAN Interface for the further processing.

void CanIf_Init (const CanIf_ConfigType* ConfigPtr);

Services · Get…

This service calls the corresponding CAN Driver service for obtaining the error state of the CAN controller.

Std_ReturnType CanIf_GetControllerErrorState (uint8 ControllerId, Can_ErrorStateType* ErrorStatePtr);

This service calls the corresponding CAN Driver service for obtaining the current status of the CAN controller.

Std_ReturnType CanIf_GetControllerMode (uint8 ControllerId, Can_ControllerStateType* ControllerModePtr);

This service calls the corresponding CAN Driver service for obtaining the Rx error counter of the CAN controller.

Std_ReturnType CanIf_GetControllerRxErrorCounter (uint8 ControllerId, uint8* RxErrorCounterPtr);

This service calls the corresponding CAN Driver service for obtaining the Tx error counter of the CAN controller.

Std_ReturnType CanIf_GetControllerTxErrorCounter (uint8 ControllerId, uint8* TxErrorCounterPtr);

This service reports the current mode of a requested PDU channel.

Std_ReturnType CanIf_GetPduMode (uint8 ControllerId, CanIf_PduModeType* PduModePtr);

This function invokes CanTrcv_GetOpMode and updates the parameter TransceiverModePtr with the value OpMode provided by CanTrcv.

Std_ReturnType CanIf_GetTrcvMode (uint8 TransceiverId, CanTrcv_TrcvModeType* TransceiverModePtr);

This service returns the reason for the wake up of the transceiver TransceiverId, via calling the corresponding CAN Transceiver Driver service.

Std_ReturnType CanIf_GetTrcvWakeupReason (uint8 TransceiverId, CanTrcv_TrcvWakeupReasonType* TrcvWuReasonPtr);

This service reports, if any TX confirmation has been done for the whole CAN controller since the last CAN controller start.

CanIf_NotifStatusType CanIf_GetTxConfirmationState (uint8 ControllerId);

Services · Set…

This service shall set the baud rate configuration of the CAN controller. Depending on necessary baud rate modifications the controller might have to reset.

Std_ReturnType CanIf_SetBaudrate (uint8 ControllerId, uint16 BaudRateConfigID);

This service calls the corresponding CAN Driver service for changing of the CAN controller mode.

Std_ReturnType CanIf_SetControllerMode (uint8 ControllerId, Can_ControllerStateType ControllerMode);

This service reconfigures the corresponding CAN identifier of the requested CAN L-PDU.

void CanIf_SetDynamicTxId (PduIdType CanIfTxSduId, Can_IdType CanId);

This service sets the requested mode at the L-PDUs of a predefined logical PDU channel.

Std_ReturnType CanIf_SetPduMode (uint8 ControllerId, CanIf_PduModeType PduModeRequest);

This service changes the operation mode of the tansceiver TransceiverId, via calling the corresponding CAN Transceiver Driver service.

Std_ReturnType CanIf_SetTrcvMode (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

This function shall call CanTrcv_SetTrcvWakeupMode.

Std_ReturnType CanIf_SetTrcvWakeupMode (uint8 TransceiverId, CanTrcv_TrcvWakeupModeType TrcvWakeupMode);

Services · Check…

Requests the CanIf module to check the Wake flag of the designated CAN transceiver.

Std_ReturnType CanIf_CheckTrcvWakeFlag (uint8 TransceiverId);

This service indicates that the check of the transceiver's wake-up flag has been finished by the corresponding CAN transceiver with the abstract CanIf TransceiverId. This indication is used to cope with the asynchronous transceiver communication.

void CanIf_CheckTrcvWakeFlagIndication (uint8 TransceiverId);

This service is performed to validate a previous wakeup event.

Std_ReturnType CanIf_CheckValidation (EcuM_WakeupSourceType WakeupSource);

This service checks, whether an underlying CAN driver or a CAN transceiver driver already signals a wakeup event.

Std_ReturnType CanIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);

Services · Controller…

This service indicates a Controller BusOff event referring to the corresponding CAN Controller with the abstract CanIf ControllerId.

void CanIf_ControllerBusOff (uint8 ControllerId);

The function derives the ErrorCounterTreshold from RxErrorCounter/ TxErrorCounter values and reports it to the IdsM as security event CANIF_SEV_ERRORSTATE_PASSIVE to the IdsM. It also prepares the context data for the respective security event.

void CanIf_ControllerErrorStatePassive (uint8 ControllerId, uint16 RxErrorCounter, uint16 TxErrorCounter);

This service indicates a controller state transition referring to the corresponding CAN controller with the abstract CanIf ControllerId.

void CanIf_ControllerModeIndication (uint8 ControllerId, Can_ControllerStateType ControllerMode);

Services · Read…

This service returns the indication status (indication occurred or not) of a specific CAN Rx L-PDU, requested by the CanIfRxSduId.

CanIf_NotifStatusType CanIf_ReadRxNotifStatus (PduIdType CanIfRxSduId);

This service provides the Data Length and the received data of the requested CanIfRxSduId to the calling upper layer.

Std_ReturnType CanIf_ReadRxPduData (PduIdType CanIfRxSduId, PduInfoType* CanIfRxInfoPtr);

This service returns the confirmation status (confirmation occurred or not) of a specific static or dynamic CAN Tx L-PDU, requested by the CanIfTxSduId.

CanIf_NotifStatusType CanIf_ReadTxNotifStatus (PduIdType CanIfTxSduId);

Services · More

Requests the CanIf module to clear the WUF flag of the designated CAN transceiver.

Std_ReturnType CanIf_ClearTrcvWufFlag (uint8 TransceiverId);

This service indicates that the transceiver has cleared the WufFlag referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

void CanIf_ClearTrcvWufFlagIndication (uint8 TransceiverId);

This service indicates that the transceiver is running in PN communication mode referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

void CanIf_ConfirmPnAvailability (uint8 TransceiverId);

Enables or disables mirroring for a CAN controller.

Std_ReturnType CanIf_EnableBusMirroring (uint8 ControllerId, boolean MirroringActive);

The function shall derive the bus error source rx or tx from the parameter CanError and report the bus error as security event CANIF_SEV_TX_ERROR_DETECTED or CANIF_SEV_RX_ ERROR_DETECTED. It also prepares the context data for the respective security event.

void CanIf_ErrorNotification (uint8 ControllerId, Can_ErrorType Can_ErrorType);

Requests transmission of a PDU.

Std_ReturnType CanIf_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);

This service indicates a transceiver state transition referring to the corresponding CAN transceiver with the abstract CanIf TransceiverId.

void CanIf_TrcvModeIndication (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

Callbacks

This service indicates a successful reception of a received CAN Rx L-PDU to the CanIf after passing all filters and validation checks.

void CanIf_RxIndication (const Can_HwType* Mailbox, const PduInfoType* PduInfoPtr);

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.

Std_ReturnType CanIf_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

This service confirms a previously successfully processed transmission of a CAN TxPDU.

void CanIf_TxConfirmation (PduIdType CanTxPduId);

Callouts and expected interfaces

This service indicates that the wake up flag in the CAN transceiver is set. This function is called in CanIf_CheckTrcvWakeFlagIndication.

void <User_CheckTrcvWakeFlagIndication> (uint8 TransceiverId);

This service indicates that the CAN transceiver has cleared the WufFlag. This function is called in CanIf_ClearTrcvWufFlagIndication.

void <User_ClearTrcvWufFlagIndication> (uint8 TransceiverId);

This service indicates that the CAN transceiver is running in PN communication mode.

void <User_ConfirmPnAvailability> (uint8 TransceiverId);

This service indicates a bus-off event to the corresponding upper layer module (mainly the CAN State Manager module).

void <User_ControllerBusOff> (uint8 ControllerId);

This service indicates a CAN controller state transition to the corresponding upper layer module (mainly the CAN State Manager module).

void <User_ControllerModeIndication> (uint8 ControllerId, Can_ControllerStateType ControllerMode);

Indication of a received PDU from a lower layer communication interface module.

void <User_RxIndication> (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

This service indicates a CAN transceiver state transition to the corresponding upper layer module (mainly the CAN State Manager module).

void <User_TrcvModeIndication> (uint8 TransceiverId, CanTrcv_TrcvModeType TransceiverMode);

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.

Std_ReturnType <User_TriggerTransmit> (PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void <User_TxConfirmation> (PduIdType TxPduId, Std_ReturnType result);

This service indicates if a wake up event initiated from the wake up source (CAN controller or transceiver) after a former request to the CAN Driver or CAN Transceiver Driver module is valid.

void <User_ValidateWakeupEvent> (EcuM_WakeupSourceType sources);

Types

This type defines a data structure for the post build parameters of the CAN interface for all underlying CAN drivers. At initialization the CanIf gets a pointer to a structure of this type to get access to its configuration data, which is necessary for initialization.

Type CanIf_NotifStatusType.

The PduMode of a channel defines its transmit or receive activity. Communication direction (transmission and/or reception) of the channel can be controlled separately or together by upper layers.