DEENESPTFRRUARHIKOZHNL

CAN Transceiver Driver (CanTrcv)

ModulCanTrcv (CAN Transceiver Driver)
BSW-Modul-ID70
Standard-Header#include "CanTrcv.h"
SWS-SpezifikationAUTOSAR_SWS_CANTransceiverDriver.pdf
ClusterCAN

Module guideAI-GENERATED

Controls external CAN transceivers: operating modes, wake-up detection, and selective wake-up via wake-up frames.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: 61900c5cf397 Provenance Open questions (4)
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

Controls external CAN transceivers: operating modes, wake-up detection, and selective wake-up via wake-up frames.

CanTrcv controls external CAN transceivers and maps them to a generic mode model with NORMAL, STANDBY, and SLEEP. Mode changes are requested asynchronously by CanIf; the driver reports reached modes back via an indication [SWS_CanTrcv_00158]. In addition, it detects wake-ups, reports them to EcuM, and, with suitable hardware, supports selective wake-up via wake-up frames. Key constraint: SLEEP can only be reached from STANDBY [SWS_CanTrcv_00104], and no wake-ups must be lost while notifications are disabled.

The CAN Transceiver Driver (CanTrcv) encapsulates external CAN transceivers behind a generic mode model. ComM and EcuM thereby remain decoupled from the concrete hardware (SWS CanTrcv p. 19). There is a driver instance for each transceiver hardware type [SWS_CanTrcv_00016]. The driver is accessed via CanIf and controls the hardware via Dio and Spi, which must be initialized before CanTrcv_Init [SWS_CanTrcv_00099]. After init, each transceiver is in STANDBY or SLEEP, configured per channel [SWS_CanTrcv_00148]. CanTrcv_DeInit leads to NOT_ACTIVE [SWS_CanTrcv_91003].

CanTrcv_SetOpMode switches between NORMAL, STANDBY, and SLEEP [SWS_CanTrcv_00102]. SLEEP is only permissible from STANDBY [SWS_CanTrcv_00104]. A switch to the current mode is not an error [SWS_CanTrcv_00161]. The function operates asynchronously: As soon as the target mode is reached, CanTrcv reports this via CanIf_TrcvModeIndication [SWS_CanTrcv_00158].

zustaende cluster_power_on POWER_ON cluster_active ACTIVE start NOT_ACTIVE NOT_ACTIVE start->NOT_ACTIVE Power on stop NOT_ACTIVE->stop Power off STANDBY CANTRCV_TRCVMODE_STANDBY NOT_ACTIVE->STANDBY CanTrcv_Init() [Init-Zustand STANDBY] SLEEP CANTRCV_TRCVMODE_SLEEP NOT_ACTIVE->SLEEP CanTrcv_Init() [Init-Zustand SLEEP] NORMAL CANTRCV_TRCVMODE_NORMAL NORMAL->NOT_ACTIVE CanTrcv_DeInit() NORMAL->NORMAL SetOpMode(NORMAL) NORMAL->STANDBY SetOpMode(STANDBY) STANDBY->NORMAL SetOpMode(NORMAL) STANDBY->STANDBY SetOpMode(STANDBY) STANDBY->SLEEP SetOpMode(SLEEP) SLEEP->NORMAL SetOpMode(NORMAL) SLEEP->SLEEP SetOpMode(SLEEP)

State diagram: Init leads to STANDBY or SLEEP, SLEEP is only reachable via STANDBY, DeInit leads to NOT_ACTIVE. Sources: SWS CanTrcv p. 19, [SWS_CanTrcv_00148]

CanIf checks wake-ups via CanTrcv_CheckWakeup. This function reports detected wake-ups via EcuM_SetWakeupEvent [SWS_CanTrcv_00146]. CanTrcv_MainFunction scans the buses in STANDBY and SLEEP [SWS_CanTrcv_00112]. CanTrcv_SetWakeupMode can disable or enable notification, or clear stored wake-ups. In doing so, no wake-up must be lost [SWS_CanTrcv_00095].

PN-capable transceivers (CanTrcvHwPnSupport) additionally wake up via configured wake-up frames [SWS_CanTrcv_00175]. During shutdown, CanSM first clears the WUF flag and then switches to STANDBY [SWS_CanTrcv_00194]. Subsequently, CanSM has the wake flag checked asynchronously [SWS_CanTrcv_00224].

In case of an error, the following applies:

  • When DET is enabled, development errors are reported; when DET is disabled, the APIs return E_NOT_OK [SWS_CanTrcv_00050].
  • The driver reports faulty hardware communication as runtime error CANTRCV_E_NO_TRCV_CONTROL [SWS_CanTrcv_91006].
  • Bus errors are reported by CanTrcv_MainFunctionDiagnostics as CANTRCV_E_BUS_ERROR to DEM [SWS_CanTrcv_00206].
Shutdown with partial networking (SPI asynchronous)CanSMCanIfCanTrcvSpiAusgang: Anforderung NoCom,Transceiver NORMAL, Controller STARTEDUse Case: Part I: clear WUF flag, STANDBYCanIf_ClearTrcvWufFlag(TransceiverId)CanTrcv_ClearTrcvWufFlag(Transceiver)Spi_AsyncTransmit(Sequence)CanIf_ClearTrcvWufFlagIndication(TransceiverId)CanSM_ClearTrcvWufFlagIndicationCanIf_SetControllerMode(ControllerId, CAN_CS_STOPPED)CanIf_SetTrcvMode(TransceiverId, CANIF_TRCV_MODE_STANDBY)CanTrcv_SetOpMode(Transceiver, STANDBY)Spi_AsyncTransmit(Sequence)CanIf_TrcvModeIndication(TransceiverId, STANDBY)CanSM_TransceiverModeIndication(TransceiverId, STANDBY)Use Case: Part II: controller sleep, check wake flagCanIf_SetControllerMode(ControllerId, CAN_CS_SLEEP)CanIf_CheckTrcvWakeFlag(TransceiverId)CanTrcv_CheckWakeFlag(Transceiver)Spi_AsyncTransmit (Wake-Flag lesen)CanIf_CheckTrcvWakeFlagIndication(TransceiverId)<User_CheckTrcvWakeFlagIndication>

Sequence diagram: During PN shutdown, the WUF flag is cleared, the transceiver is switched to STANDBY, and the wake flag is checked asynchronously. Sources: SWS CanTrcv p. 55, [SWS_CanTrcv_00194]

Role: Driver for external CAN transceivers below CanIf

The CAN Transceiver Driver (CanTrcv) controls external CAN transceiver devices. It maps their hardware states to a generic operating mode model. This model is intended to uniformly cover many available transceivers. According to the specification, it accepts having one or two states too many for a specific device, but thereby decouples ComM and EcuM from the hardware (SWS CanTrcv p. 19). To this end, the transceiver hardware must provide an interface that can be mapped to this model [SWS_CanTrcv_00098].

Upwards, CanIf is the immediate partner:

Feedbacks run via CanIf_TrcvModeIndication, which belongs to the mandatory interfaces [SWS_CanTrcv_00085]. For PN indications, further CanIf callbacks are listed [SWS_CanTrcv_00086]. Downwards, CanTrcv uses Dio and Spi for hardware control as well as Icu, DEM, and EcuM types, as shown in the import list [SWS_CanTrcv_00084]. Wait times during state transitions are implemented by the driver with Tm_BusyWait1us16bit [SWS_CanTrcv_00230]. CanTrcv_MainFunction and CanTrcv_MainFunctionDiagnostics are called by the BSW Scheduler (SWS CanTrcv p. 47).

kontext EcuM EcuM / Integrationscode CanTrcv CanTrcv EcuM->CanTrcv CanTrcv_Init SchM BSW-Scheduler (SchM) SchM->CanTrcv CanTrcv_MainFunction CanTrcv_MainFunctionDiagnostics CanSM CanSM CanIf CanIf CanSM->CanIf CanIf_SetTrcvMode CanIf_ClearTrcvWufFlag CanIf_CheckTrcvWakeFlag CanIf->CanSM CanSM_TransceiverModeIndication CanIf->CanTrcv SetOpMode, GetOpMode, GetBusWuReason, SetWakeupMode, CheckWakeup, ClearTrcvWufFlag, CheckWakeFlag CanTrcv->EcuM EcuM_SetWakeupEvent CanTrcv->CanIf CanIf_TrcvModeIndication CanIf_ClearTrcvWufFlagIndication CanIf_CheckTrcvWakeFlagIndication Dio Dio CanTrcv->Dio Dio_WriteChannel Spi Spi CanTrcv->Spi SPI-Sequenzen Icu Icu CanTrcv->Icu Icu_EnableNotification Icu_DisableNotification Tm Tm CanTrcv->Tm Tm_BusyWait1us16bit Det Det CanTrcv->Det Development and runtime errors Dem Dem CanTrcv->Dem Dem_SetEventStatus (CANTRCV_E_BUS_ERROR) HW CAN-Transceiver-Hardware Dio->HW Pins Spi->HW Register

Context diagram: CanTrcv is serviced by CanIf, EcuM, and the scheduler and accesses the hardware via Dio, Spi, and Icu. It reports errors to DET and DEM. Sources: [SWS_CanTrcv_00084], [SWS_CanTrcv_00085], [SWS_CanTrcv_00146], SWS EcuM p. 35

Initialization, Lifecycle, and Deinitialization

Before calling CanTrcv_Init [SWS_CanTrcv_00001], the environment must have initialized all used drivers, in particular Spi and Dio [SWS_CanTrcv_00099]. The document passage adds two timing requirements: Initialization should occur early after power-up, and the lower-layer services should be short and synchronous (SWS CanTrcv p. 26).

CanTrcv_Init initializes all connected transceivers according to their initialization sequences and the configuration from ConfigPtr [SWS_CanTrcv_00180]. The content of CanTrcv_ConfigType is hardware-specific [SWS_CanTrcv_00209]. Afterward, each transceiver is in CANTRCV_TRCVMODE_SLEEP or CANTRCV_TRCVMODE_STANDBY; this is configurable per transceiver [SWS_CanTrcv_00148].

Initialization simultaneously checks for wake-ups:

  • If supported by the hardware, CanTrcv_Init checks whether transceiver activity triggered the wake-up. It reports the result via EcuM_SetWakeupEvent with the source from CanTrcvWakeupSourceRef [SWS_CanTrcv_00167].
  • For PN-capable transceivers, the configuration sequence is additionally executed again if the POR or SYSERR flag is set. Otherwise, the configuration stored in the transceiver remains valid [SWS_CanTrcv_00182].
  • A set POR flag is also reported as a wake-up via CanTrcvPorWakeupSourceRef [SWS_CanTrcv_00183].

The POR report fits transceivers with integrated power supply. For them, passive wake-up looks like a power-on reset to the ECU (SWS EcuM p. 70).

init start vor Environment has initialized Spi and Dio start->vor init CanTrcv_Init(ConfigPtr) vor->init komm Communication to transceiver correct? init->komm noctrl Laufzeitfehler CANTRCV_E_NO_TRCV_CONTROL komm->noctrl no baud Baud rate supported? komm->baud yes baudErr DET: CANTRCV_E_BAUDRATE_NOT_SUPPORTED baud->baudErr no seq Execute initialization sequences according to configuration baud->seq yes porsys PN hardware: POR or SYSERR set? seq->porsys rekonf Execute configuration sequence again porsys->rekonf yes wu Wake-up by transceiver activity? porsys->wu No / no PN HW por POR-Flag gesetzt? rekonf->por porWu EcuM_SetWakeupEvent (CanTrcvPorWakeupSourceRef) por->porWu yes por->wu no porWu->wu wuMeld EcuM_SetWakeupEvent (CanTrcvWakeupSourceRef) wu->wuMeld yes ziel State configured per channel: CANTRCV_TRCVMODE_STANDBY or CANTRCV_TRCVMODE_SLEEP wu->ziel no wuMeld->ziel ende ziel->ende

Activity diagram: Initialization checks hardware reachability, handles POR/SYSERR, reports wake-ups to EcuM, and ends per channel in STANDBY or SLEEP. The sequence of checks is an interpretation. Sources: [SWS_CanTrcv_00180], [SWS_CanTrcv_00182], [SWS_CanTrcv_00183], [SWS_CanTrcv_00167], [SWS_CanTrcv_00148]

CanTrcv_DeInit [SWS_CanTrcv_91001] sets the transceiver hardware to the NOT_ACTIVE state [SWS_CanTrcv_91003]. In this state, it can be set up with a new configuration sequence (SWS CanTrcv p. 49). The expected initial state is CANTRCV_TRCVMODE_NORMAL; otherwise, development error detection reports CANTRCV_E_TRCV_NOT_NORMAL [SWS_CanTrcv_91005].

Operating Modes NORMAL, STANDBY, and SLEEP

CanTrcv_TrcvModeType defines the three modes [SWS_CanTrcv_00163]. CanTrcv_SetOpMode [SWS_CanTrcv_00002] switches the internal state of the addressed transceiver to one of these modes [SWS_CanTrcv_00102]. For the transitions, the following applies:

zustaende cluster_power_on POWER_ON cluster_active ACTIVE start NOT_ACTIVE NOT_ACTIVE start->NOT_ACTIVE Power on stop NOT_ACTIVE->stop Power off STANDBY CANTRCV_TRCVMODE_STANDBY NOT_ACTIVE->STANDBY CanTrcv_Init() [Init-Zustand STANDBY] SLEEP CANTRCV_TRCVMODE_SLEEP NOT_ACTIVE->SLEEP CanTrcv_Init() [Init-Zustand SLEEP] NORMAL CANTRCV_TRCVMODE_NORMAL NORMAL->NOT_ACTIVE CanTrcv_DeInit() NORMAL->NORMAL SetOpMode(NORMAL) NORMAL->STANDBY SetOpMode(STANDBY) STANDBY->NORMAL SetOpMode(NORMAL) STANDBY->STANDBY SetOpMode(STANDBY) STANDBY->SLEEP SetOpMode(SLEEP) SLEEP->NORMAL SetOpMode(NORMAL) SLEEP->SLEEP SetOpMode(SLEEP)

State diagram: After init, the transceiver is in STANDBY or SLEEP. SLEEP is only reachable via STANDBY, NORMAL from all modes. DeInit leads to NOT_ACTIVE. Sources: SWS CanTrcv p. 19, [SWS_CanTrcv_00148], [SWS_CanTrcv_00103], [SWS_CanTrcv_00104], [SWS_CanTrcv_91003]

CanTrcv_SetOpMode operates asynchronously: E_OK only means that the request was accepted (SWS CanTrcv p. 33). Only when the target mode has been reached does CanTrcv call CanIf_TrcvModeIndication with the abstract CanIf TransceiverId [SWS_CanTrcv_00158]. CanSM ignores such a report for SLEEP because SLEEP is only requested by the integration code (SWS CanSM p. 94).

For PN-capable hardware, CanTrcv_SetOpMode additionally checks the POR and SYSERR flags [SWS_CanTrcv_00186]. After a POR, it re-initializes the transceiver [SWS_CanTrcv_00187]. CanTrcv_GetOpMode [SWS_CanTrcv_00005] synchronously returns the current state [SWS_CanTrcv_00106].

Transceiver mode switchCanSMCanIfCanTrcvDio / SpiCanIf_SetTrcvMode(TransceiverId, TransceiverMode)CanTrcv_SetOpMode(Transceiver, OpMode)optPN-Hardware (CanTrcvHwPnSupport = TRUE)Check POR/SYSERR flags,Reinitialize after PORDio_WriteChannel or SPI sequenceE_OK (Anforderung angenommen)E_OKAsynchronous: target mode isReached laterCanIf_TrcvModeIndication(TransceiverId, TransceiverMode)CanSM_TransceiverModeIndication(TransceiverId, TransceiverMode)CanSM ignores notification for SLEEP

Sequence diagram: A mode change is accepted synchronously and later confirmed via CanIf to CanSM by indication. Sources: SWS CanTrcv p. 52, [SWS_CanTrcv_00158], [SWS_CanTrcv_00186]

Wake-up: Detection, Cause, and Notification Control

A wake-up is detected via interrupt or via polling (SWS EcuM p. 179). CanIf queries the function CanTrcv_CheckWakeup [SWS_CanTrcv_00143] via CanIf_CheckWakeup (SWS CanIf p. 56). If the hardware supports it, this function validates a wake-up caused by transceiver activity and reports it via EcuM_SetWakeupEvent [SWS_CanTrcv_00146].

CanTrcv_MainFunction [SWS_CanTrcv_00013] scans all buses in STANDBY and SLEEP for wake-ups and sets a wake-up flag [SWS_CanTrcv_00112]. Presumably, it is relevant primarily in polling configurations; the configuration diagram provides the value CanTrcvWakeUpByPolling for this (ECUC-Parameter p. 185). Question Q-6144fdedb98cea44 (open)

CanTrcv_GetBusWuReason [SWS_CanTrcv_00007] returns the wake-up cause detected by the transceiver [SWS_CanTrcv_00107]. Possible values are, for instance, CANTRCV_WU_BY_BUS, CANTRCV_WU_INTERNALLY, or CANTRCV_WU_RESET [SWS_CanTrcv_00165]. How finely the causes can be distinguished depends heavily on the hardware (SWS CanTrcv p. 35).

For wake-up interrupts, the driver uses ICU channels. It calls Icu_EnableNotification and Icu_DisableNotification only if CanTrcvIcuChannelRef is configured [SWS_CanTrcv_00171]. When switching to STANDBY, it enables the channels [SWS_CanTrcv_00172]. The document passage from R24-11 additionally mentions disabling when switching to NORMAL (SWS CanTrcv p. 23).

Wake-up detection via the transceiverTransceiver-HardwareEcuM / IntegrationscodeCanIfCanTrcvaltWake-up per InterruptWake-up-Interrupt (ICU-Kanal)CanIf_CheckWakeup(WakeupSource)CanTrcv_CheckWakeup(Transceiver)Wake-up durch Transceiver-Validate activityEcuM_SetWakeupEvent(CanTrcvWakeupSourceRef)Wake-up per PollingCanTrcv_MainFunction: Busse inCheck STANDBY/SLEEP, set flagCanIf_CheckWakeup(WakeupSource)CanTrcv_CheckWakeup(Transceiver)EcuM_SetWakeupEvent(CanTrcvWakeupSourceRef)Use Case: Ursache abfragenCanIf_GetTrcvWakeupReason(TransceiverId, TrcvWuReasonPtr)CanTrcv_GetBusWuReason(Transceiver, reason)E_OK, reason = z. B. CANTRCV_WU_BY_BUSE_OK

Sequence diagram: A wake-up is checked at the transceiver via CanIf using interrupt or polling, reported to EcuM, and later queried for its cause. Sources: SWS EcuM p. 179, SWS EcuM p. 138, SWS EcuM p. 140, [SWS_CanTrcv_00146], [SWS_CanTrcv_00112]

CanTrcv_SetWakeupMode [SWS_CanTrcv_00009] controls wake-up notification via CanTrcv_TrcvWakeupModeType [SWS_CanTrcv_00164]:

In the disabled phase, no wake-ups must be lost [SWS_CanTrcv_00095]. Clearing serves to discard stored wake-ups under control of the higher layer while notifications are disabled [SWS_CanTrcv_00150]. CanIf passes the request on to CanTrcv via CanIf_SetTrcvWakeupMode (SWS CanIf p. 100).

Selective wake-up (partial networking)

With partial networking, nodes remain in low-power mode until predefined wake-up frames (WUF) wake them up. PN-capable transceivers therefore react not only to the wake-up pattern (WUP), but also to these frames (SWS CanTrcv p. 27). Whether the hardware supports this is indicated by CanTrcvHwPnSupport [SWS_CanTrcv_00174]. Only if this parameter is TRUE do the container CanTrcvPartialNetwork and five APIs exist: CanTrcv_GetTrcvSystemData, CanTrcv_ClearTrcvWufFlag, CanTrcv_ReadTrcvTimeoutFlag, CanTrcv_ClearTrcvTimeoutFlag, and CanTrcv_ReadTrcvSilenceFlag [SWS_CanTrcv_00175].

Which frames the transceiver responds to is specified by CanTrcvPnFrameCanId, CanTrcvPnFrameCanIdMask, and CanTrcvPnFrameDataMask [SWS_CanTrcv_00177]. CanTrcv_SetPNActivationState [SWS_CanTrcv_00219] enables the PN wake-up function with PN_ENABLED [SWS_CanTrcv_00221] and disables it with PN_DISABLED [SWS_CanTrcv_00222].

Central is the shutdown sequence:

  1. CanSM clears the WUF flag via CanTrcv_ClearTrcvWufFlag so that no frame wake-up is lost upon entering low-power mode. Subsequently, the transceiver transitions to STANDBY [SWS_CanTrcv_00194].
  2. CanTrcv confirms the clearing with CanIf_ClearTrcvWufFlagIndication [SWS_CanTrcv_00195].
  3. Finally, CanSM requests the asynchronous check CanTrcv_CheckWakeFlag [SWS_CanTrcv_00223]. CanTrcv reports the result via CanIf_CheckTrcvWakeFlagIndication [SWS_CanTrcv_00224].

For SPI connection, the specification describes an asynchronous (SWS CanTrcv p. 55) and a synchronous variant (SWS CanTrcv p. 57).

Shutdown with partial networking (SPI asynchronous)CanSMCanIfCanTrcvSpiAusgang: Anforderung NoCom,Transceiver NORMAL, Controller STARTEDUse Case: Part I: clear WUF flag, STANDBYCanIf_ClearTrcvWufFlag(TransceiverId)CanTrcv_ClearTrcvWufFlag(Transceiver)Spi_AsyncTransmit(Sequence)CanIf_ClearTrcvWufFlagIndication(TransceiverId)CanSM_ClearTrcvWufFlagIndicationCanIf_SetControllerMode(ControllerId, CAN_CS_STOPPED)CanIf_SetTrcvMode(TransceiverId, CANIF_TRCV_MODE_STANDBY)CanTrcv_SetOpMode(Transceiver, STANDBY)Spi_AsyncTransmit(Sequence)CanIf_TrcvModeIndication(TransceiverId, STANDBY)CanSM_TransceiverModeIndication(TransceiverId, STANDBY)Use Case: Part II: controller sleep, check wake flagCanIf_SetControllerMode(ControllerId, CAN_CS_SLEEP)CanIf_CheckTrcvWakeFlag(TransceiverId)CanTrcv_CheckWakeFlag(Transceiver)Spi_AsyncTransmit (Wake-Flag lesen)CanIf_CheckTrcvWakeFlagIndication(TransceiverId)<User_CheckTrcvWakeFlagIndication>

Sequence diagram: During PN shutdown, the WUF flag is cleared, the transceiver is switched to STANDBY, and the wake flag is checked asynchronously after controller sleep. Sources: SWS CanTrcv p. 55, SWS CanTrcv p. 56, SWS CanSM p. 36, [SWS_CanTrcv_00194], [SWS_CanTrcv_00224]

For diagnostics, CanTrcv_GetTrcvSystemData [SWS_CanTrcv_00213] reads out the configuration and status of the transceiver as uint32 [SWS_CanTrcv_00189]. The timeout and silence flags are read and cleared via CanTrcv_ReadTrcvTimeoutFlag [SWS_CanTrcv_00215], CanTrcv_ClearTrcvTimeoutFlag [SWS_CanTrcv_00216], and CanTrcv_ReadTrcvSilenceFlag [SWS_CanTrcv_00217]. Their state is indicated by CanTrcv_TrcvFlagStateType [SWS_CanTrcv_00211].

Configuration and instance reference

For each transceiver hardware type, there is a driver instance that serves all devices of this type [SWS_CanTrcv_00016]. The CanIf diagram shows the case of identical controllers with different transceiver types, which then requires two transceiver drivers (SWS CanIf p. 34). Each channel is described by a container CanTrcvChannel (multiplicity 1..*). Among other things, it contains CanTrcvHwPnSupport, CanTrcvInitState, CanTrcvWakeupByBusUsed, and the wake-up source references (SWS CanTrcv p. 70).

One difference between the sources concerns the state after init. The configuration diagram lists CanTrcvOpModeNormal as the default for CanTrcvInitState (ECUC-Parameter p. 187). However, normative for R20-11 is [SWS_CanTrcv_00148], which provides only SLEEP or STANDBY after init. The driver must reject configurations with unsupported partition assignments [SWS_CanTrcv_00231].

Behavior in the event of an error

The development errors from [SWS_CanTrcv_00050] follow a uniform pattern. With DET enabled, the APIs report:

If DET is disabled, the APIs return E_NOT_OK in these cases.

If communication with the transceiver is disrupted, the driver reports the runtime error CANTRCV_E_NO_TRCV_CONTROL [SWS_CanTrcv_91006] via Det_ReportRuntimeError [SWS_CanTrcv_00085]. This applies, for example, in Init [SWS_CanTrcv_00113], SetOpMode [SWS_CanTrcv_00114], GetOpMode [SWS_CanTrcv_00115], SetWakeupMode [SWS_CanTrcv_00117], GetTrcvSystemData [SWS_CanTrcv_00190], and ClearTrcvWufFlag [SWS_CanTrcv_00196]. An exception is CanTrcv_GetBusWuReason: in this case, according to [SWS_CanTrcv_00116], it returns E_OK. Init reports an unsupported baud rate as CANTRCV_E_BAUDRATE_NOT_SUPPORTED [SWS_CanTrcv_00168].

fehler start aufruf API-Aufruf, z. B. CanTrcv_SetOpMode start->aufruf init Modul initialisiert? aufruf->init eUninit DET: CANTRCV_E_UNINIT (DET aus: E_NOT_OK) init->eUninit no id Transceiver ID valid? init->id yes eId DET: CANTRCV_E_INVALID_TRANSCEIVER (DET aus: E_NOT_OK) id->eId no ptr Zeigerparameter != NULL? id->ptr yes ePtr DET: CANTRCV_E_PARAM_POINTER (DET aus: E_NOT_OK) ptr->ePtr no modus Mode / transition permitted? ptr->modus ja / kein Zeiger eModus DET: CANTRCV_E_PARAM_TRCV_OPMODE, CANTRCV_E_TRCV_NOT_NORMAL, or CANTRCV_E_TRCV_NOT_STANDBY (DET off: E_NOT_OK) modus->eModus no hw Hardware access via Dio / Spi modus->hw yes komm Kommunikation korrekt? hw->komm eKomm Det_ReportRuntimeError: CANTRCV_E_NO_TRCV_CONTROL Return E_NOT_OK (GetBusWuReason: E_OK) komm->eKomm no ok E_OK komm->ok yes

Activity diagram: API calls pass through development error checks followed by hardware access with runtime error handling. The check order is an interpretation. Sources: [SWS_CanTrcv_00050], [SWS_CanTrcv_00122], [SWS_CanTrcv_00123], [SWS_CanTrcv_00132], [SWS_CanTrcv_00114], [SWS_CanTrcv_00116]

Bus errors are treated as production errors. The prerequisite is that the hardware can distinguish bus errors from other errors [SWS_CanTrcv_00178] and CanTrcvBusErrFlag = TRUE [SWS_CanTrcv_00205]. Then CanTrcv_MainFunctionDiagnostics [SWS_CanTrcv_00218] cyclically reads the BUSERR flag. It reports CANTRCV_E_BUS_ERROR as DEM_EVENT_STATUS_FAILED [SWS_CanTrcv_00206] or DEM_EVENT_STATUS_PASSED [SWS_CanTrcv_00227] to DEM [SWS_CanTrcv_00228] [SWS_CanTrcv_00229]. The DEM event is referenced via CanTrcvDemEventParameterRefs (SWS CanTrcv p. 78).

Further detailed evidence

AI-generated guide based on the requirements and document passages contained in the payload for CanTrcv (Classic, R20-11). Document passages from other releases are used complementarily; where they deviate, this is noted. Statements marked as interpretation are non-normative.

CAN Transceiver Driver (CanTrcv)

Controls physical bus transceiver states and wakeup detection on CAN lines.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function CanTrcv_Init [SWS_CanTrcv_00001] 📄 PDF

void CanTrcv_Init (const CanTrcv_ConfigType* ConfigPtr);

Initializes the Can Trcv module.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 69eb894dc0d7 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The function CanTrcv_Init serves for the basic initialization of the CanTrcv module as well as all connected CAN transceivers [SWS_CanTrcv_00001] [SWS_CanTrcv_00180]. Execution is synchronous and specified as non-reentrant [SWS_CanTrcv_00001]. As a parameter, it expects a pointer to the driver configuration via ConfigPtr and has no return value [SWS_CanTrcv_00001].

Interaction and Hardware Check

During execution, the function performs the hardware-related initialization sequences of all connected transceivers according to the configuration, thereby supporting the initialization sequence of the AUTOSAR stack [SWS_CanTrcv_00180]. Upon the call, each transceiver transitions separately into either mode CANTRCV_TRCVMODE_SLEEP or CANTRCV_TRCVMODE_STANDBY, depending on its respective configuration [SWS_CanTrcv_00148]. If supported by the hardware, CanTrcv_Init also checks whether a wake-up event due to transceiver activity was previously present and reports this via EcuM_SetWakeupEvent with the source defined via CanTrcvWakeupSourceRef to the EcuM [SWS_CanTrcv_00167].

Error handling

In the event of faulty or missing communication with the hardware (for example via port pins or SPI), the function reports the runtime error CANTRCV_E_NO_TRCV_CONTROL to the Default Error Tracer [SWS_CanTrcv_00113]. If development error detection is active, CANTRCV_E_BAUDRATE_NOT_SUPPORTED is furthermore reported if a configured baud rate is not supported by the respective transceiver [SWS_CanTrcv_00168].

This text was generated by an AI based on the AUTOSAR R20-11 specification.

Implementer's Guide to follow (complexity I1)

function CanTrcv_SetOpMode [SWS_CanTrcv_00002] 📄 PDF

Std_ReturnType CanTrcv_SetOpMode (uint8 Transceiver, CanTrcv_TrcvModeType OpMode);

Sets the mode of the Transceiver to the value Op Mode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 62862d69beb4 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function CanTrcv_SetOpMode is used to asynchronously switch the operating mode of a CAN transceiver [SWS_CanTrcv_00002]. It takes the device number of the transceiver (Transceiver) as well as the desired target mode (OpMode), which can assume the values CANTRCV_TRCVMODE_NORMAL, CANTRCV_TRCVMODE_STANDBY, or CANTRCV_TRCVMODE_SLEEP [SWS_CanTrcv_00102]. The function is reentrant for different transceivers [SWS_CanTrcv_00002]. The return value E_OK confirms acceptance of the mode switch request; E_NOT_OK signals rejection of the request, parameter errors, or lack of support for the mode by the hardware [SWS_CanTrcv_00002], [SWS_CanTrcv_00105].

When calling, specified state transitions must be observed:

  • If the transceiver is in mode CANTRCV_TRCVMODE_NORMAL, only CANTRCV_TRCVMODE_STANDBY or CANTRCV_TRCVMODE_NORMAL may be passed as the target mode [SWS_CanTrcv_00103].
  • If the transceiver is in CANTRCV_TRCVMODE_STANDBY, the function may only be called with CANTRCV_TRCVMODE_SLEEP or CANTRCV_TRCVMODE_STANDBY [SWS_CanTrcv_00104].

With Development Error Detection (DET) enabled, the function reports calls prior to initialization as CANTRCV_E_UNINIT [SWS_CanTrcv_00122], invalid transceiver numbers as CANTRCV_E_INVALID_TRANSCEIVER [SWS_CanTrcv_00123], and impermissible operating modes as CANTRCV_E_PARAM_TRCV_OPMODE [SWS_CanTrcv_00087]. If Standby is requested without the transceiver being in Normal or Standby, CANTRCV_E_TRCV_NOT_NORMAL is triggered [SWS_CanTrcv_00120]; upon requesting Sleep outside of Standby or Sleep, the notification CANTRCV_E_TRCV_NOT_STANDBY occurs [SWS_CanTrcv_00121]. If the DET is disabled, E_NOT_OK is returned in these cases. In the event of missing or faulty transceiver communication, the runtime error CANTRCV_E_NO_TRCV_CONTROL is reported to the DET and E_NOT_OK is returned [SWS_CanTrcv_00114].

If Selective Wakeup is supported on the hardware side, the API checks the status flags POR and SYSERR [SWS_CanTrcv_00186]. As soon as the transceiver has reached the requested mode, the module informs the upper layer via the callback CanIf_TrcvModeIndication [SWS_CanTrcv_00158].

This text was generated by an AI based on the specification requirements.

Implementer's Guide to follow (complexity I2)

function CanTrcv_GetBusWuReason [SWS_CanTrcv_00007] 📄 PDF

Std_ReturnType CanTrcv_GetBusWuReason (uint8 Transceiver, CanTrcv_TrcvWakeupReasonType* reason);

Gets the wakeup reason for the Transceiver and returns it in parameter Reason.

function CanTrcv_SetWakeupMode [SWS_CanTrcv_00009] 📄 PDF

Std_ReturnType CanTrcv_SetWakeupMode (uint8 Transceiver, CanTrcv_TrcvWakeupModeType TrcvWakeupMode);

En ables, disables or clears wake - up events of the Transceiver according to Trcv Wakeup Mode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7ddf69d5a7ae Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous function CanTrcv_SetWakeupMode is used to enable, disable, or clear wake-up events for a specific transceiver [SWS_CanTrcv_00009]. The target transceiver is passed to it via parameter Transceiver and the desired mode via TrcvWakeupMode. Upon successful state change, the function returns E_OK. If the state cannot be changed or if a parameter is invalid, E_NOT_OK is returned and the previous state remains unchanged [SWS_CanTrcv_00009].

Operating Modes and Interaction

If TrcvWakeupMode is called with the value CANTRCV_WUMODE_CLEAR, the function clears a stored wake-up event of the addressed transceiver [SWS_CanTrcv_00094]. When called with CANTRCV_WUMODE_ENABLE, the module updates the wake-up event to the state "present", provided that a stored wake-up event is already pending for the respective bus [SWS_CanTrcv_00111]. Interpretation: A corresponding mode value presumably exists analogously for disabling wake-up events, even though this is not detailed separately in the present excerpt of requirements. Question Q-e0f15d1d0855db81 (open)

Error Handling and Concurrency

The function is reentrant for different transceiver instances [SWS_CanTrcv_00009]. Before the call, the transceiver driver must be fully initialized: a call in the uninitialized state triggers the error CANTRCV_E_UNINIT if Development Error Detection (DET) is active; otherwise, E_NOT_OK is returned [SWS_CanTrcv_00127]. An invalid index for Transceiver leads to CANTRCV_E_INVALID_TRANSCEIVER (or E_NOT_OK) [SWS_CanTrcv_00131], and an invalid mode value in TrcvWakeupMode reports CANTRCV_E_PARAM_TRCV_WAKEUP_MODE or returns E_NOT_OK [SWS_CanTrcv_00089]. If there is no communication or faulty communication with the transceiver, the runtime error CANTRCV_E_NO_TRCV_CONTROL is reported to the Default Error Tracer and E_NOT_OK is returned [SWS_CanTrcv_00117].

This usage note was generated automatically based on the specification of AUTOSAR Classic R20-11.

Implementer's Guide to follow (complexity I2)

function CanTrcv_GetTrcvSystemData [SWS_CanTrcv_00213] 📄 PDF

Std_ReturnType CanTrcv_GetTrcvSystemData (uint8 Transceiver, uint32* TrcvSysData);

Reads the transceiver configuration/ status data and returns it through parameter Trcv Sys Data. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

function CanTrcv_ClearTrcvWufFlag [SWS_CanTrcv_00214] 📄 PDF

Std_ReturnType CanTrcv_ClearTrcvWufFlag (uint8 Transceiver);

Clears the WUF flag in the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 10eca0b578cb Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function CanTrcv_ClearTrcvWufFlag clears the wake-up frame flag (WUF) in the hardware of the addressed CAN transceiver and is only available if selective wakeup support is configured (CanTrcvHwPnSupport = TRUE) [SWS_CanTrcv_00214], [SWS_CanTrcv_00175]. Upon successful clearing, E_OK is returned; otherwise, E_NOT_OK is returned [SWS_CanTrcv_00214], [SWS_CanTrcv_00194].

Interaction and Sequence

The API is used by module CanSM when entering a low-power mode to ensure that no frame wake-up event is lost during the state transition [SWS_CanTrcv_00194]. After clearing the WUF flag, the CAN transceiver must be set to standby mode (CANTRCV_STANDBY) [SWS_CanTrcv_00194].

Concurrency and Call Context

Calls to CanTrcv_ClearTrcvWufFlag are reentrant for different transceiver instances (Transceiver) [SWS_CanTrcv_00214].

Error handling

  • Development errors (DET): If error detection is active, the function reports error CANTRCV_E_UNINIT [SWS_CanTrcv_00197] if the driver is uninitialized, and error CANTRCV_E_INVALID_TRANSCEIVER [SWS_CanTrcv_00198] if parameter Transceiver is invalid. If DET is disabled, E_NOT_OK is returned directly in these cases [SWS_CanTrcv_00197], [SWS_CanTrcv_00198].
  • Runtime errors: If communication with the transceiver fails or is faulty, the function reports runtime error CANTRCV_E_NO_TRCV_CONTROL to the Default Error Tracer and returns E_NOT_OK [SWS_CanTrcv_00196].

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function CanTrcv_ReadTrcvTimeoutFlag [SWS_CanTrcv_00215] 📄 PDF

Std_ReturnType CanTrcv_ReadTrcvTimeoutFlag (uint8 Transceiver, CanTrcv_TrcvFlagStateType* FlagState);

Reads the status of the tim eout flag from the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a58e25cc2696 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function CanTrcv_ReadTrcvTimeoutFlag reads the status of the timeout flag directly from the hardware of the CAN transceiver [SWS_CanTrcv_00215]. The input parameter Transceiver serves to identify the transceiver to be addressed, while the state of the flag is returned via the output parameter FlagState of type CanTrcv_TrcvFlagStateType* [SWS_CanTrcv_00215]. With E_OK, the return value signals successful reading and with E_NOT_OK that the status of the timeout flag could not be determined [SWS_CanTrcv_00215].

The following boundary conditions apply to the usage and integration in the transceiver driver:

  • Configuration: The API is available exclusively if hardware support for partial networking is enabled (CanTrcvHwPnSupport = TRUE) [SWS_CanTrcv_00215]. The associated configuration container CanTrcvPartialNetwork also exists only under this prerequisite [SWS_CanTrcv_00175].
  • Concurrency: The function is specified as non-reentrant (Non Reentrant) [SWS_CanTrcv_00215].

Error handling distinguishes according to the state of Development Error Detection (DET):

  • If an invalid transceiver identifier is passed, the module generates the error CANTRCV_E_INVALID_TRANSCEIVER when DET is active; if DET is disabled, E_NOT_OK is returned instead [SWS_CanTrcv_00199].
  • If a null pointer is passed for FlagState (FlagState = NULL), the module reports the error CANTRCV_E_PARAM_POINTER when DET is active; if DET is turned off, the call yields E_NOT_OK [SWS_CanTrcv_00200].

This usage note was generated automatically based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I2)

function CanTrcv_ClearTrcvTimeoutFlag [SWS_CanTrcv_00216] 📄 PDF

Std_ReturnType CanTrcv_ClearTrcvTimeoutFlag (uint8 Transceiver);

Clears the status of the timeout flag in the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 58509e1d0c7c Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function CanTrcv_ClearTrcvTimeoutFlag is used to reset the timeout flag in the transceiver hardware [SWS_CanTrcv_00216]. It is available exclusively if hardware support for Partial Networking is enabled via the configuration parameter CanTrcvHwPnSupport = TRUE [SWS_CanTrcv_00175], [SWS_CanTrcv_00216].

Usage and Interface

The call is made synchronously via the interface in CanTrcv.h by specifying the target transceiver:

  • Parameters: As an input value (uint8), Transceiver specifies the transceiver channel to be addressed [SWS_CanTrcv_00216].
  • Return value: A Std_ReturnType signals with E_OK the successful clearing of the hardware flag or with E_NOT_OK a failure of the operation [SWS_CanTrcv_00216].

Error handling

If an invalid identifier is passed to the function for the parameter Transceiver, a differentiated error handling applies:

  • With Development Error Detection active, the error CANTRCV_E_INVALID_TRANSCEIVER is reported to the DET [SWS_CanTrcv_00201].
  • If Development Error Detection is disabled, the call terminates and returns E_NOT_OK to the caller [SWS_CanTrcv_00201].

Concurrency and system integration

The function is classified as non-reentrant (Non Reentrant) [SWS_CanTrcv_00216]. Parallel calls for the same hardware unit must therefore be avoided or synchronized by the calling layer. In addition, the function is part of the functional scope for selective wakeup functions (Partial Networking); the associated configuration structures in the container CanTrcvPartialNetwork also exist only if CanTrcvHwPnSupport is set [SWS_CanTrcv_00175].

This usage note is based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I1)

function CanTrcv_ReadTrcvSilenceFlag [SWS_CanTrcv_00217] 📄 PDF

Std_ReturnType CanTrcv_ReadTrcvSilenceFlag (uint8 Transceiver, CanTrcv_TrcvFlagStateType* FlagState);

Reads the status of the silence flag from the transceiver hardware. This API shall exi st only if Can Trcv Hw Pn Support = TRUE.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: be15c667bc30 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and non-reentrant function CanTrcv_ReadTrcvSilenceFlag (service ID 0x0d) is used to read the silence flag status directly from the CAN transceiver hardware [SWS_CanTrcv_00217]. It is provided via the header CanTrcv.h and must not be executed concurrently due to the lack of reentrancy [SWS_CanTrcv_00217].

Parameters and Return Values

  • Transceiver: Input parameter (uint8) for addressing the respective transceiver instance via its identifier [SWS_CanTrcv_00217].
  • FlagState: Output parameter as a pointer to CanTrcv_TrcvFlagStateType via which the read status of the silence flag is returned [SWS_CanTrcv_00217].
  • Return value (Std_ReturnType): Returns E_OK if the hardware state of the silence flag could be read successfully, otherwise E_NOT_OK [SWS_CanTrcv_00217].

Error handling

If a null pointer is passed to the function for the output parameter (FlagState == NULL), error handling depends on development error detection: with DET enabled, the CAN transceiver driver reports the development error CANTRCV_E_PARAM_POINTER; if DET is disabled, the call is immediately aborted with E_NOT_OK [SWS_CanTrcv_00203].

Configuration and Interaction

The function is in the context of Selective Wakeup. The associated configuration container CanTrcvPartialNetwork and the interface CanTrcv_ReadTrcvSilenceFlag are available in the driver only if hardware support for Partial Networking is configured via CanTrcvHwPnSupport = TRUE [SWS_CanTrcv_00175], [SWS_CanTrcv_00217].

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function CanTrcv_CheckWakeup [SWS_CanTrcv_00143] 📄 PDF

Std_ReturnType CanTrcv_CheckWakeup (uint8 Transceiver);

Service is called by underlying CANIF in case a wake up interrupt is detected.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3bcebb868332 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous and reentrant function CanTrcv_CheckWakeup is called by the underlying interface CanIf as soon as a wake-up interrupt has been detected [SWS_CanTrcv_00143]. The parameter Transceiver addresses the CAN transceiver to be checked [SWS_CanTrcv_00143]. The return value E_OK indicates acceptance of the call, whereas E_NOT_OK indicates non-acceptance [SWS_CanTrcv_00143].

If supported by hardware, the function checks whether a wake-up event due to activity on the transceiver is actually present [SWS_CanTrcv_00146]. If this is the case, the wake-up notification to the EcuM is made via the API EcuM_SetWakeupEvent with the wake-up source referenced in CanTrcvWakeupSourceRef [SWS_CanTrcv_00146].

For error handling, the following specifications apply when development error detection (DET) is activated:

  • If the function is called before the initialization of the CanTrcv module, the development error CANTRCV_E_UNINIT is reported; if DET is disabled, the call returns E_NOT_OK instead [SWS_CanTrcv_00144].
  • If an invalid transceiver number is passed, the function reports CANTRCV_E_INVALID_TRANSCEIVER; if DET is disabled, E_NOT_OK is returned [SWS_CanTrcv_00145].

This usage note is based exclusively on the specification requirements of AUTOSAR Classic R20-11.

Implementer's Guide to follow (complexity I1)

function CanTrcv_SetPNActivationState [SWS_CanTrcv_00219] 📄 PDF

Std_ReturnType CanTrcv_SetPNActivationState (CanTrcv_PNActivationType ActivationState);

The API configures the wake - up of the transceiver for Standby and Sleep Mode: Either the CAN transceiver is woken up by a remote wake - up pattern (standard CAN wake - up) or by the configured remote wake - up frame.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ed5e02955479 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function CanTrcv_SetPNActivationState configures the wake-up behavior of the CAN transceiver for Standby and Sleep mode ([SWS_CanTrcv_00219]). It defines whether the transceiver is woken up via a standard wake-up pattern or specifically via a configured remote wake-up frame in the context of Partial Networking ([SWS_CanTrcv_00219]).

Usage and Parameters

The function is provided via CanTrcv.h with the service ID 0x0f and is executed synchronously ([SWS_CanTrcv_00219]). Its passing parameter ActivationState of type CanTrcv_PNActivationType controls the operating mode:

As the return value, the function returns E_OK if the transceiver was successfully switched to the requested PN configuration. If switching fails, E_NOT_OK is returned; in this case, the previous configuration remains unchanged ([SWS_CanTrcv_00219]).

Restrictions and Error Handling

The function is non-reentrant (Non Reentrant) ([SWS_CanTrcv_00219]). As a mandatory precondition, the module CanTrcv must have been completely initialized prior to the call: if the call occurs prior to initialization, the function reports the error CANTRCV_E_UNINIT to the DET when Development Error Detection is active; if DET is disabled, the call is rejected immediately with the return value E_NOT_OK ([SWS_CanTrcv_00220]).

This usage note was generated automatically based on the specification.

Implementer's Guide to follow (complexity I1)

function CanTrcv_CheckWakeFlag [SWS_CanTrcv_00223] 📄 PDF

Std_ReturnType CanTrcv_CheckWakeFlag (uint8 Transceiver);

Requests to check the status of the wakeup flag from the transceiver hardware.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3347f44cb215 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function CanTrcv_CheckWakeFlag requests the check of the wakeup flag status directly from the transceiver hardware ([SWS_CanTrcv_00223]). The call is asynchronous and refers via the input parameter Transceiver to the respective identifier of the CAN transceiver to be addressed ([SWS_CanTrcv_00223]).

As return value, the function provides the status Std_ReturnType ([SWS_CanTrcv_00223]):

Regarding concurrency, it is specified that the function is not reentrant (Non Reentrant) ([SWS_CanTrcv_00223]). Since the service is specified as asynchronous, the return value merely reflects the acceptance of the verification request; the actual reading of the hardware is likely performed downstream ([SWS_CanTrcv_00223]). Question Q-f09b7ff49c24cea8 (open) Specific error codes as well as DET or DEM messages are not listed for this service.

This usage note was generated by an AI based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function CanTrcv_DeInit [SWS_CanTrcv_91001] 📄 PDF

void CanTrcv_DeInit (void);

De - initializes the Can Trcv module.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f6b7395c6c6d Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function CanTrcv_DeInit serves to de-initialize the CAN transceiver driver [SWS_CanTrcv_91001]. It takes no parameters, returns no value, and is specified as non-reentrant (Non Reentrant) [SWS_CanTrcv_91001]. The interface is provided via the header CanTrcv.h with service ID 0x10 [SWS_CanTrcv_91001].

During execution, the function puts the CAN transceiver hardware into state NOT_ACTIVE [SWS_CanTrcv_91003]. Since CanTrcv_DeInit is non-reentrant, calls must not interrupt each other or execute concurrently [SWS_CanTrcv_91001].

Regarding error handling and sequencing conditions, the following applies:

  • If development error detection is enabled for the module, the function checks the operating mode of the transceiver. If the transceiver is not in mode CANTRCV_TRCVMODE_NORMAL when called, CanTrcv_DeInit reports the development error CANTRCV_E_TRCV_NOT_NORMAL [SWS_CanTrcv_91005].
  • This results in the functional precondition for the caller to operate the transceiver in state CANTRCV_TRCVMODE_NORMAL before de-initialization in order to prevent an error report in development mode [SWS_CanTrcv_91005].

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

function CanTrcv_MainFunction [SWS_CanTrcv_00013] 📄 PDF

void CanTrcv_MainFunction (void);

Service to scan all busses for wake up events and perform these event.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8f993661c2b3 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function CanTrcv_MainFunction serves as a central driver service of the CAN transceiver driver for monitoring all connected bus channels for wake-up events that have occurred and for executing these events [SWS_CanTrcv_00013]. It has the C signature void CanTrcv_MainFunction(void), is defined under the hexadecimal service ID 0x06, and operates synchronously without parameters or return values [SWS_CanTrcv_00013].

For cyclic monitoring, the function specifically scans all buses that are in the low-power states STANDBY or SLEEP [SWS_CanTrcv_00112]. If the driver detects a wake-up event on one of the monitored buses, CanTrcv_MainFunction sets an internal wake-up event flag to initiate the downstream execution and processing of these events in the system [SWS_CanTrcv_00112].

Regarding the call context, the interface is provided via the header file SchM_CanTrcv.h [SWS_CanTrcv_00013]. Interpretation: The provision via this SchM header suggests that the function is likely called periodically by the BSW Scheduler in the context of a cyclic task to regularly sample the bus channels in inactive states. Question Q-588109b1111a0f43 (open) Specific error codes, notifications to the DET or DEM, and reentrancy requirements are not mentioned in this specification excerpt.

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function CanTrcv_MainFunctionDiagnostics [SWS_CanTrcv_00218] 📄 PDF

void CanTrcv_MainFunctionDiagnostics (void);

Reads the transceiver diagnostic status periodically and sets product/ development accordingly.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 958c670ba046 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The function CanTrcv_MainFunctionDiagnostics (service ID 0x08) periodically reads the diagnostic status of the transceiver and sets corresponding production and development errors [SWS_CanTrcv_00218]. The function takes no parameters, has no return value (void CanTrcv_MainFunctionDiagnostics(void)), and is provided via the header SchM_CanTrcv.h [SWS_CanTrcv_00218].

Call Context and Concurrency

Due to the provision via SchM_CanTrcv.h, the main function is presumably called cyclically by the BSW Scheduler (SchM) in a task context (interpretation). Question Q-ab1f6c55abcb8d4b (open) Since the specification does not indicate reentrancy, non-reentrant execution must be assumed.

Error Handling and Interaction with the DEM

Diagnostic evaluation is performed depending on configuration and hardware support:

  • If the BUSERR flag reported by the BSW is set, the function calls the API Dem_SetEventStatus with parameter EventId as CANTRCV_E_BUS_ERROR and EventStatus as DEM_EVENT_STATUS_FAILED [SWS_CanTrcv_00206].
  • If the BUSERR flag is reset, CanTrcv_MainFunctionDiagnostics calls the API Dem_SetEventStatus with the same EventId (CANTRCV_E_BUS_ERROR) and the status DEM_EVENT_STATUS_PASSED [SWS_CanTrcv_00227].

This text was generated by an AI. It does not replace studying the relevant AUTOSAR specifications.

Implementer's Guide to follow (complexity I1)

type CanTrcv_ConfigType [SWS_CanTrcv_00209] 📄 PDF

This is the type of the external data structure containing the overall initialization data for the CAN transceiver driver and settings affecting all transceivers. Furthermore it contains pointers to transceiver configuration structures. The con tents of the initialization data structure are CAN transceiver hardware specific.

type CanTrcv_PNActivationType [SWS_CanTrcv_00210] 📄 PDF

Datatype used for describing whether PN wakeup functionality in Can Trcv is enabled or disabled.

type CanTrcv_TrcvFlagStateType [SWS_CanTrcv_00211] 📄 PDF

Provides the state of a flag in the transceiver hardware.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4ef0e0487226 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The enumeration type CanTrcv_TrcvFlagStateType represents the state of an individual flag in the transceiver hardware [SWS_CanTrcv_00211]. The declaration is provided for applying software modules and drivers via the header file CanTrcv.h [SWS_CanTrcv_00211].

The value range has a binary structure and distinguishes two discrete states according to [SWS_CanTrcv_00211]:

  • CANTRCV_FLAG_SET: Indicates that the respective flag in the transceiver hardware is set [SWS_CanTrcv_00211].
  • CANTRCV_FLAG_CLEARED: Indicates that the flag in the transceiver hardware is cleared or not set [SWS_CanTrcv_00211].

Regarding practical usage, it can be noted that the type primarily serves the standardized representation of hardware-related register states [SWS_CanTrcv_00211]. Interpretation: Calling layers such as the CAN interface driver or diagnostic modules are typically expected to read this type via query functions through pointer parameters or return values in order to evaluate any error or wake-up flags. Question Q-1b75b4baf2f4c6e3 (open) Since the type itself contains no functional logic, reentrancy restrictions, or DET notifications, verifying valid value ranges is the responsibility of the processing interfaces.

This text was generated by an AI and serves as guidance. The AUTOSAR specification is authoritative.

Implementer's Guide to follow (complexity I1)

type CanTrcv_TrcvModeType [SWS_CanTrcv_00163] 📄 PDF

Operating modes of the CAN Transceiver Driver.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b8ef2e8c5d35 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

According to [SWS_CanTrcv_00163], the enumeration type CanTrcv_TrcvModeType defines the standardized operating modes for the CAN transceiver driver (CanTrcv). The declaration is provided via the header file Can_GeneralTypes.h for cross-software interfaces in the AUTOSAR communication stack.

Value Range and Meanings

According to [SWS_CanTrcv_00163], three enumeration values are available:

  • CANTRCV_TRCVMODE_NORMAL (value 0x00): Designates the regular transceiver operating mode for transmitting and receiving CAN messages.
  • CANTRCV_TRCVMODE_STANDBY: Represents the standby mode of the transceiver, in which communication is idle and power consumption is reduced.
  • CANTRCV_TRCVMODE_SLEEP: Represents the sleep mode of the transceiver for maximum power saving.

Usage and restrictions

The enumeration serves as the common data type representation for the hardware state of the CAN transceiver [SWS_CanTrcv_00163]. Interpretation: The type is presumably intended primarily for parameter passing in control and query interfaces of the transceiver driver, via which higher layers such as the CAN interface initiate mode switches or read the current status. Question Q-95fceb6988818621 (open) Because the present specification excerpt contains no runtime errors (DET/DEM), reentrancy specifications, or concrete function signatures, call contexts and concurrency rules are to be taken from the respective using driver functions.

This usage note is based exclusively on the specification data from AUTOSAR R20-11 for [SWS_CanTrcv_00163].

Implementer's Guide to follow (complexity I1)

type CanTrcv_TrcvWakeupModeType [SWS_CanTrcv_00164] 📄 PDF

This type shall be used to control the CAN transceiver concerning wake up events and wake up notifications.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ceecd083c1cd Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The enumeration type CanTrcv_TrcvWakeupModeType is used to control a CAN transceiver with regard to wake-up events and wake-up notifications [SWS_CanTrcv_00164]. The type definition is provided via the header file Can_GeneralTypes.h and is thus available stack-wide [SWS_CanTrcv_00164].

The value range comprises three control modes for the respectively addressed transceiver [SWS_CanTrcv_00164]:

  • CANTRCV_WUMODE_ENABLE (value 0x00): Enables notification for wakeup events on the addressed transceiver [SWS_CanTrcv_00164].
  • CANTRCV_WUMODE_DISABLE (value 0x01): Disables notification for wakeup events on the addressed transceiver [SWS_CanTrcv_00164].
  • CANTRCV_WUMODE_CLEAR (value 0x02): Clears a wakeup event stored in the addressed transceiver [SWS_CanTrcv_00164].

Interpretation: In practice, the type is presumably used primarily as a passing parameter in control functions of the transceiver driver to dynamically enable or disable wake-up notifications and to reset detected wake-up events. Question Q-c53d60cdad0442ca (open) Because the specification as a pure enumeration type defines no function signatures, execution semantics, error codes, or concurrency rules, these aspects are determined entirely by the calling and processing driver interfaces [SWS_CanTrcv_00164].

This text was created by an AI; accuracy cannot be guaranteed.

Implementer's Guide to follow (complexity I1)

type CanTrcv_TrcvWakeupReasonType [SWS_CanTrcv_00165] 📄 PDF

This type denotes the wake up reason detected by the CAN transceiver in detail. AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_CANTransceiverDriver

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

Record
AUTOSAR/AP/record/CP_MOD_CanTrcv
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_CanTrcv@rel:R20-11#3a4deb89
Content hash
3a4deb89
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_CANTransceiverDriver.pdf#nameddest=SWS_CanTrcv_00001

Initialization and status

De - initializes the Can Trcv module.

void CanTrcv_DeInit (void);

Gets the version of the module and returns it in Version Info.

void CanTrcv_GetVersionInfo (Std_VersionInfoType* versioninfo);
CanTrcv_Init function

Initializes the Can Trcv module.

void CanTrcv_Init (const CanTrcv_ConfigType* ConfigPtr);

Services · Get…

Gets the wakeup reason for the Transceiver and returns it in parameter Reason.

Std_ReturnType CanTrcv_GetBusWuReason (uint8 Transceiver, CanTrcv_TrcvWakeupReasonType* reason);

Gets the mode of the Transceiver and returns it in Op Mode.

Std_ReturnType CanTrcv_GetOpMode (uint8 Transceiver, CanTrcv_TrcvModeType* OpMode);

Reads the transceiver configuration/ status data and returns it through parameter Trcv Sys Data. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

Std_ReturnType CanTrcv_GetTrcvSystemData (uint8 Transceiver, uint32* TrcvSysData);

Services · Set…

Sets the mode of the Transceiver to the value Op Mode.

Std_ReturnType CanTrcv_SetOpMode (uint8 Transceiver, CanTrcv_TrcvModeType OpMode);

The API configures the wake - up of the transceiver for Standby and Sleep Mode: Either the CAN transceiver is woken up by a remote wake - up pattern (standard CAN wake - up) or by the configured remote wake - up frame.

Std_ReturnType CanTrcv_SetPNActivationState (CanTrcv_PNActivationType ActivationState);

En ables, disables or clears wake - up events of the Transceiver according to Trcv Wakeup Mode.

Std_ReturnType CanTrcv_SetWakeupMode (uint8 Transceiver, CanTrcv_TrcvWakeupModeType TrcvWakeupMode);

Services · More

Requests to check the status of the wakeup flag from the transceiver hardware.

Std_ReturnType CanTrcv_CheckWakeFlag (uint8 Transceiver);

Service is called by underlying CANIF in case a wake up interrupt is detected.

Std_ReturnType CanTrcv_CheckWakeup (uint8 Transceiver);

Clears the status of the timeout flag in the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

Std_ReturnType CanTrcv_ClearTrcvTimeoutFlag (uint8 Transceiver);

Clears the WUF flag in the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

Std_ReturnType CanTrcv_ClearTrcvWufFlag (uint8 Transceiver);

Reads the status of the silence flag from the transceiver hardware. This API shall exi st only if Can Trcv Hw Pn Support = TRUE.

Std_ReturnType CanTrcv_ReadTrcvSilenceFlag (uint8 Transceiver, CanTrcv_TrcvFlagStateType* FlagState);

Reads the status of the tim eout flag from the transceiver hardware. This API shall exist only if Can Trcv Hw Pn Support = TRUE.

Std_ReturnType CanTrcv_ReadTrcvTimeoutFlag (uint8 Transceiver, CanTrcv_TrcvFlagStateType* FlagState);

Cyclic

Service to scan all busses for wake up events and perform these event.

void CanTrcv_MainFunction (void);

Reads the transceiver diagnostic status periodically and sets product/ development accordingly.

void CanTrcv_MainFunctionDiagnostics (void);

Types

This is the type of the external data structure containing the overall initialization data for the CAN transceiver driver and settings affecting all transceivers. Furthermore it contains pointers to transceiver configuration structures. The con tents of the initialization data structure are CAN transceiver hardware specific.

Datatype used for describing whether PN wakeup functionality in Can Trcv is enabled or disabled.

Provides the state of a flag in the transceiver hardware.

Operating modes of the CAN Transceiver Driver.

This type shall be used to control the CAN transceiver concerning wake up events and wake up notifications.

This type denotes the wake up reason detected by the CAN transceiver in detail. AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_CANTransceiverDriver