Default Error Tracer (DET)
The DET handles development errors, runtime errors, and transient faults across all BSW modules and SW-Cs.
Funktionen — Übersicht
void Det_Init (const Det_ConfigType* ConfigPtr);Service to initialize the Default Error Tracer.Std_ReturnType Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);Service to report development errors.void Det_Start (void);Service to start the Default Error Tracer.Std_ReturnType Det_ReportRuntimeError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, faultErrorTracer uint8 ErrorId);Service to report runtime errors.Std_ReturnType Det_ReportTransientFault (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);Service to report transient faults.void Det_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this module.Std_ReturnType <User_Error_Hooks> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);-Std_ReturnType <DetReportRuntimeErrorCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);-Std_ReturnType <DetReportTransientFaultCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);-
Typen — Übersicht
struct Det_ConfigTypeConfiguration data structure of the Det module.
Funktionen & Typen — Detailansicht
function Det_Init [SWS_Det_00008] 📄 PDF
void Det_Init (const Det_ConfigType* ConfigPtr);
Service to initialize the Default Error Tracer.
The synchronous function Det_Init serves as a central service for initializing the Default Error Tracer ([SWS_Det_00008]). It is provided via the header file Det.h and has the signature void Det_Init (const Det_ConfigType* ConfigPtr). Via the formal input parameter ConfigPtr, the function accepts a pointer to the selected configuration data set of the module. A return value is not provided for this service ([SWS_Det_00008]).
With respect to runtime behavior, Det_Init is mandatorily specified as non-reentrant (Non Reentrant) ([SWS_Det_00008]). For this reason, the function must under no circumstances be called in parallel or preemptively from different execution contexts during ongoing operation. The module is presumably called centrally during the initialization phase of the basic software, even before other BSW modules or components transmit errors to the DET (interpretation). Question Q-143a3c098d03d7f8 (open)
The function is defined with the service ID 0x00 ([SWS_Det_00008]). Dedicated error codes, specific error handling mechanisms, or separate error messages via DET or DEM are not identified for this initialization call in the present specification excerpt.
Within requirement tracing, the interface satisfies the general AUTOSAR requirements for uniform API naming conventions according to [SRS_BSW_00310] (SWS DefaultErrorTracer §6 “Requirements Tracing”).
This note was generated by an AI based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I1)
function Det_ReportError [SWS_Det_00009] 📄 PDF
Std_ReturnType Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);
Service to report development errors.
The function Det_ReportError serves in AUTOSAR Classic BSW modules to report development errors when error detection is active ([SWS_BSW_00045], [SWS_Det_00009]). The interface is declared reentrant ([SWS_Det_00009]). The execution behavior does not return to the caller ("never returns"); the return type Std_ReturnType exists merely for compatibility with services and hooks ([SWS_Det_00009]).
The passed parameters uniquely identify the error context ([SWS_Det_00009]):
ModuleId(uint16): AUTOSAR module identifier of the reporting module; basic software uses the range 0 to 255 (EXP_LayeredSoftwareArchitecture §3 “Default Error Tracer”).InstanceId(uint8): Module instance starting from 0; for single instances, 0 is passed ([SWS_Det_00009]).ApiId(uint8): Identifier of the error-detecting API service ([SWS_Det_00009]).ErrorId(uint8): Specific error identifier of the BSW module ([SWS_BSW_00045], [SWS_Det_00009]).
Development errors represent fundamental precondition violations caused by software bugs, misconfigurations, or integration problems (EXP_LayeredSoftwareArchitecture §3 “Error Classification”, [SRS_BSW_00337] wording not yet imported), such as calling an uninitialized module ([SWS_BSW_00243]) or invalid parameters ([SWS_CANIF_00538]). They are handled like assertions: After calling all callbacks configured in DetErrorHook ([SWS_Det_00501]), normal control flow must not continue; the DET stops execution, for example, by means of an endless loop, halt instruction, or reset ([SRS_BSW_00337] wording not yet imported, EXP_LayeredSoftwareArchitecture §3 “Error Classification”).
This usage note was generated by an AI based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I2)
function Det_Start [SWS_Det_00010] 📄 PDF
void Det_Start (void);
Service to start the Default Error Tracer.
The synchronous API function Det_Start serves to start the Default Error Tracer (DET) ([SWS_Det_00010]). This service is declared in header file Det.h under service ID 0x02 (SWS_DefaultErrorTracer §8.1.3.3 “Det_Start”). According to the syntax void Det_Start(void), the function takes neither input nor output parameters and returns no return value to the caller ([SWS_Det_00010]).
Specific conditions apply to integration and execution:
- Reentrancy and concurrency: The function is defined as non-reentrant (
Non Reentrant) ([SWS_Det_00010]). Concurrent calls from multiple tasks or interrupting contexts are not permissible. - Call context: Interpretation: The call is likely to occur centrally during system startup after basic initialization in order to activate error tracing in the ECU. Question Q-b28f205b1cc7acfa (open)
- Error handling: The interface reports no error states; in the specification excerpt, neither error codes nor DET or DEM events are defined for this call ([SWS_Det_00010]).
In the overall system, Det_Start fulfills the standardized naming convention for AUTOSAR basic software according to [SRS_BSW_00310] wording not yet imported (SWS_DefaultErrorTracer §6 “Requirements Tracing”).
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Det_ReportRuntimeError [SWS_Det_01001] 📄 PDF
Std_ReturnType Det_ReportRuntimeError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, faultErrorTracer uint8 ErrorId);
Service to report runtime errors. If a callout has been configured then this callout shall be called.
The function [SWS_Det_01001] serves as a central BSW service in Det.h for receiving runtime errors. It operates synchronously and is designed to be reentrant [SWS_Det_01001].
Usage and Parameters
When reporting errors, calling BSW modules pass four mandatory parameters to [SWS_Det_01001]:
ModuleId: Module identifier of the reporting BSW module.InstanceId: Index-based instance number (for modules with only one instance, the value0).ApiId: Identifier of the API function in which the error occurred.ErrorId: Module-specific identifier of the detected runtime error.
The service always returns the return value E_OK to the calling module [SWS_Det_01001].
Interaction and Error Handling
According to the AUTOSAR architecture, runtime errors are distinguished from development errors (which violate fundamental preconditions) and production errors (which are relevant for workshop diagnostics) EXP_LayeredSoftwareArchitecture §Integration and Runtime Aspects. The service is integrated, for example, as a mandatory interface by the ADC driver [SWS_Adc_00530] or DDS [CP_SWS_Dds_00832] wording not yet imported.
In CanIf, for example, a transmission attempt via an offline channel leads to the reporting of CANIF_E_STOPPED [SWS_CANIF_00382], while length exceedances without truncation are reported as CANIF_E_TXPDU_LENGTH_EXCEEDED [SWS_CANIF_00900].
When [SWS_Det_01001] is called, all callout functions configured in the configuration parameter DetReportRuntimeErrorCallout are executed [SWS_Det_00503]. If no error hooks have been configured, additional function calls are omitted, while forwarding to the DLT remains active provided it is configured [SWS_Det_00503].
This usage note was generated automatically based on the AUTOSAR R20-11 specification status.
Implementer's Guide to follow (complexity I2)
function Det_ReportTransientFault [SWS_Det_01003] 📄 PDF
Std_ReturnType Det_ReportTransientFault (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);
Service to report transient faults. If a callout has been configured than this callout shall be called and the returned value of the callout shall be returned. Otherwise it returns immediately with E_ OK.
The synchronous and reentrant function Det_ReportTransientFault (service ID 0x05) serves BSW modules for the standardized reporting of detected transient errors to the Default Error Tracer ([SWS_BSW_00225], [SWS_Det_01003]). The service is declared via header Det.h, but is marked as obsolete (OBSOLETE) in release R20-11 (SWS_DefaultErrorTracer §8.1.3.5 “Det_ReportTransientFault”).
Upon invocation, exclusively input parameters are passed: the identifier of the calling module (ModuleId), the instance index (InstanceId, where single-instance modules pass 0), the service ID of the error-detecting API (ApiId), and the error number (FaultId), which according to SWS_BSWGeneral §7.2.4.4 “Reporting” must be of type uint8 ([SWS_Det_01003]).
The call forwards the error to configured callout functions and evaluates their feedback:
- A call leads to the execution of all callbacks configured under
DetReportTransientFaultCallout([SWS_Det_00502]). - If no configured callout exists, the function terminates immediately and returns the value
E_OK([SWS_Det_01003]). - If exactly one callout is configured,
Det_ReportTransientFaultreturns its return value of typeStd_ReturnType([SWS_Det_01003]). - If multiple callouts are present, the logical OR combination (sum) of all callout return values is formed. Since
E_OK = 0is defined, the function returnsE_OKonly if all callouts respond error-free withE_OK([SWS_Det_01003]).
Regarding concurrency and execution environment, the function is designed to be reentrant, which is why it can be called concurrently from different module contexts ([SWS_Det_01003]).
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function Det_GetVersionInfo [SWS_Det_00011] 📄 PDF
void Det_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information of this module.
function <User_Error_Hooks> [SWS_Det_00181] 📄 PDF
Std_ReturnType <User_Error_Hooks> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);
-
The configurable interface <User_Error_Hooks> defines the invocation of user-defined callout functions upon the detection of development errors [SWS_Det_00181]. As soon as function Det_ReportError is called, all callouts configured for this in the system must be executed synchronously [SWS_Det_00180]. The declaration of this interface is provided via header Det_Externals.h SWS DefaultErrorTracer §8.1.5 “Callout Functions / Configurable Interfaces”.
The function has the service ID 0x10 and passes four diagnostic parameters for error analysis [SWS_Det_00181]:
ModuleId: Unique module ID of the calling BSW module.InstanceId: Identifier of the module instance, starting at0(for modules with only one instance,0is passed).ApiId: Identifier of the affected API function according to the specification of the respective module.ErrorId: Identifier of the specific development error.
According to the specification, the interface always returns the return value E_OK, as required for such services [SWS_Det_00181]. Custom error codes or alternative status values cannot be reported back to the caller via the interface.
Regarding execution, <User_Error_Hooks> is designed to be synchronous and reentrant [SWS_Det_00181]. If multiple callouts are defined for the same service, they must have the same signature and service ID [SWS_Det_00180]. Interpretation: Since processing takes place directly in the call context of Det_ReportError, user hooks should not use blocking mechanisms in order not to delay system execution. Question Q-acd1afcd9336992f (open)
This usage note was generated automatically based on the AUTOSAR R20-11 specification.
function <DetReportRuntimeErrorCallout> [SWS_Det_00184] 📄 PDF
Std_ReturnType <DetReportRuntimeErrorCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId);
-
The configurable callout interface <DetReportRuntimeErrorCallout> serves for user-specific capture and further processing of runtime errors in the Default Error Tracer (SWS_DefaultErrorTracer §8.1.5 “Callout Functions / Configurable Interfaces”). As soon as the function Det_ReportRuntimeError is called, the DET synchronously executes all callout functions configured for it ([SWS_Det_00180], [SWS_Det_00503]). Configured callout functions are provided via the header file Det_Externals.h and have the service ID 0x11 ([SWS_Det_00184]).
Parameters and Return Value
ModuleId(uint16): Numerical identifier of the BSW module reporting the runtime error ([SWS_Det_00184]).InstanceId(uint8): Module instance index, starting at 0; for single instances, 0 is always passed ([SWS_Det_00184]).ApiId(uint8): Identifier of the API service in which the runtime error occurred ([SWS_Det_00184]).ErrorId(uint8): Module-specific identifier of the detected runtime error ([SWS_Det_00184]).- Return value: According to the service specification, type
Std_ReturnTypealways returnsE_OK([SWS_Det_00184]).
Concurrency and behavior
The callout function is specified as reentrant and is processed synchronously in the execution context of the reporting entity ([SWS_Det_00184]). All callouts configured for the same service must have the same signature and service ID ([SWS_Det_00180]). Since the return value is fixed to E_OK, no feedback of error states to the DET takes place via the callout.
Note: This usage note was generated automatically based on the AUTOSAR Classic R20-11 specification.
function <DetReportTransientFaultCallout> [SWS_Det_00187] 📄 PDF
Std_ReturnType <DetReportTransientFaultCallout> (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId);
-
The callout hook [SWS_Det_00187] serves for application-specific handling of transient faults in the Default Error Tracer (DET). The function is executed synchronously and is defined with the service ID 0x12 [SWS_Det_00187]. It takes four input parameters:
ModuleId: Module identifier of the calling software module [SWS_Det_00187].InstanceId: Index-based instance ID of the module starting at0, where single-instance modules must pass the value0[SWS_Det_00187].ApiId: Identifier of the API service in which the transient fault occurred [SWS_Det_00187].FaultId: Identifier of the detected transient fault according to the SWS of the calling module [SWS_Det_00187].
As return value, the interface provides a value of type Std_ReturnType, which is directly propagated to the caller of Det_ReportTransientFault [SWS_Det_00187]. The declaration is provided via the header file Det_Externals.h [SWS_Det_00187].
Regarding concurrency, the function is specified as reentrant [SWS_Det_00187]. Since the return value is passed on synchronously, the callout implementation should not contain any blocking operations in order not to impermissibly delay execution of the reporting module. Question Q-23eaffed8be030bb (open)
This text was generated by an AI based on the specification data.
type Det_ConfigType [SWS_Det_00210] 📄 PDF
Configuration data structure of the Det module.
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Det- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Det@rel:R20-11#272e23bd- Content hash
272e23bd- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_DefaultErrorTracer.pdf#nameddest=SWS_Det_00008
gemini-3.8-flash-low· 2026-10-13 · German original