DEENESPTFRRUARHIKOZHNL

EEPROM Driver (Eep)

ModulEep (EEPROM Driver)
BSW-Modul-ID90
Standard-Header#include "Eep.h"
SWS-SpezifikationAUTOSAR_CP_SWS_EEPROMDriver.pdf, AUTOSAR_SWS_EEPROMDriver.pdf, AUTOSAR_SWS_EEPROM_Driver.pdf
Umfang135 Records · 9 Snippets
ClusterSpeicher-Stack (Memory)

EEPROM Driver (Eep)

AUTOSAR Classic Memory Drivers-Modul EEPROM Driver (Eep, Spezifikation: AUTOSAR_CP_SWS_EEPROMDriver.pdf, AUTOSAR_SWS_EEPROMDriver.pdf, AUTOSAR_SWS_EEPROM_Driver.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

फ़ंक्शन Eep_Init [SWS_Eep_00143] 📄 PDF

void Eep_Init(const Eep_ConfigType* ConfigPtr);

Service for EEPROM initialization.

फ़ंक्शन Eep_Compare [SWS_Eep_00148] 📄 PDF

Std_ReturnType Eep_Compare(Eep_AddressType EepromAddress, const uint8* DataBufferPtr, Eep_LengthType Length);

Compares a data block in EEPROM with an EEPROM block in the memory.

फ़ंक्शन Eep_MainFunction [SWS_Eep_00153] 📄 PDF

void Eep_MainFunction(void);

Service to perform the processing of the EEPROM jobs (read/write/erase/compare) .

फ़ंक्शन Eep_JobEndNotification [SWS_Eep_00157] 📄 PDF

void Eep_JobEndNotification(void);

This callback function provided by the module user is called when a job has been completed with a positive result.

फ़ंक्शन Eep_JobErrorNotification [SWS_Eep_00158] 📄 PDF

void Eep_JobErrorNotification(void);

This callback function provided by the module user is called when a job has been canceled or finished with negative result.

टाइप Eep_ConfigType [SWS_Eep_00225] 📄 PDF

This is the type of the external data structure containing the initialization data for the EEPROM driver.

टाइप Eep_AddressType [SWS_Eep_00226] 📄 PDF

Used as address offset from the configured EEPROM base address to access a certain EEPROM memory area.

requirement SWS_Eep_00000 [SWS_Eep_00000] 📄 PDF

Type of error Related error code Error value Invalid configuration set selection EEP_E_INIT_FAILED 0x10 Invalid configuration set selection EEP_E_PARAM_ADDRESS 0x11 Invalid configuration set selection EEP_E_PARAM_DATA 0x12 Invalid configuration set selection EEP_E_PARAM_LENGTH 0x13 API service called without module initialization EEP_E_UNINIT 0x20 API service called with a NULL pointer EEP_E_PARAM_POINTER 0x23

requirement SWS_Eep_00004 [SWS_Eep_00004] 📄 PDF

The function Eep_Init shall initialize all EEPROM relevant reg- isters with the values of the structure referenced by the parameter ConfigPtr .

requirement SWS_Eep_00006 [SWS_Eep_00006] 📄 PDF

After having finished the module initialization, the function Eep_- Init shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_OK .

requirement SWS_Eep_00009 [SWS_Eep_00009] 📄 PDF

The function Eep_Read shall copy the given parameters, initiate a read job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

requirement SWS_Eep_00013 [SWS_Eep_00013] 📄 PDF

The Eep module shall execute the read job asynchronously within the Eep module's job processing function. During job processing the Eep module shall read a data block of size Length from EepromAddress + EEPROM base address to * DataBufferPtr . The function Eep_Read checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Read checks the EEPROM state according to requirement [SWS_Eep_00033].

requirement SWS_Eep_00014 [SWS_Eep_00014] 📄 PDF

The function Eep_Write shall copy the given parameters, initiate a write job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

requirement SWS_Eep_00015 [SWS_Eep_00015] 📄 PDF

The Eep module shall execute the write job asynchronously within the Eep module's job processing function. During job processing the Eep module shall write a data block of size Length from * DataBufferPtr to EepromAddress + EEP- ROM base address. The function Eep_Write checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Write checks the EEPROM state according to requirement [SWS_Eep_00033].

requirement SWS_Eep_00016 [SWS_Eep_00016] 📄 PDF

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that DataBufferPtr is not NULL. If DataBufferPtr is NULL, they shall raise development error EEP_E_PARAM_DATA , otherwise (if no development error detection is enabled) it shall return with E_NOT_OK .

requirement SWS_Eep_00017 [SWS_Eep_00017] 📄 PDF

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that EepromAddress is valid. If EepromAddress is not within the valid EEP- ROM address range they shall raise development error EEP_E_PARAM_ADDRESS , oth- erwise (if no development error detection is enabled) it shall return with E_NOT_OK .

requirement SWS_Eep_00018 [SWS_Eep_00018] 📄 PDF

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that the parameter Length is within the specified minimum and maximum val- ues: • Min.: 1 • Max.: EepSize - EepromAddress If the parameter Length is not within the specified minimum and maximum values, they shall raise development error EEP_E_PARAM_LENGTH , otherwise (if no development error detection is enabled) it shall return with E_NOT_OK .

requirement SWS_Eep_00019 [SWS_Eep_00019] 📄 PDF

The function Eep_Erase shall copy the given parameters, initiate an erase job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

requirement SWS_Eep_00020 [SWS_Eep_00020] 📄 PDF

The Eep module shall execute the erase job asynchronously within the Eep module's job processing function. The Eep module shall erase an EEP- ROM block starting from EepromAddress + EEPROM base address of size Length . The function Eep_Erase checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Erase checks the EEPROM state according to requirement [SWS_Eep_00033].

requirement SWS_Eep_00021 [SWS_Eep_00021] 📄 PDF

The function Eep_Cancel shall abort a running job syn- chronously so that directly after returning from this function a new job can be requested by the upper layer.

requirement SWS_Eep_00024 [SWS_Eep_00024] 📄 PDF

The function Eep_GetJobResult shall synchronously return the result of the last job that has been accepted by the Eep module.

requirement SWS_Eep_00025 [SWS_Eep_00025] 📄 PDF

The function Eep_Compare shall copy the given parameters, ini- tiate a compare job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_JOB_PENDING and return.

requirement SWS_Eep_00026 [SWS_Eep_00026] 📄 PDF

The Eep module shall execute the compare job asynchronously within the Eep module's job processing function. During job processing the Eep module shall compare the EEPROM data block at EepromAddress + EEPROM base address of size Length with the data block at * DataBufferPtr of the same length. The service Eep_Compare checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The service Eep_Compare checks the EEPROM state according to requirement [SWS_Eep_00033].

requirement SWS_Eep_00027 [SWS_Eep_00027] 📄 PDF

The function Eep_Cancel shall set the EEP module state to MEMIF_IDLE .

requirement SWS_Eep_00028 [SWS_Eep_00028] 📄 PDF

The function Eep_Cancel shall set the job result to MEMIF_- JOB_CANCELED if the job result currently has the value MEMIF_JOB_PENDING . Other- wise it shall leave the job result unchanged.

requirement SWS_Eep_00029 [SWS_Eep_00029] 📄 PDF

The function Eep_GetStatus shall return the EEPROM status synchronously.

requirement SWS_Eep_00030 [SWS_Eep_00030] 📄 PDF

The function Eep_MainFunction shall perform the processing of the EEPROM read, write, erase and compare jobs.

requirement SWS_Eep_00031 [SWS_Eep_00031] 📄 PDF

When a job has been initiated, the Eep's user shall call the func- tion Eep_MainFunction cyclically until the job is finished.

requirement SWS_Eep_00032 [SWS_Eep_00032] 📄 PDF

The function Eep_MainFunction shall return without action if no job is pending.

requirement SWS_Eep_00033 [SWS_Eep_00033] 📄 PDF

The functions Eep_SetMode() , Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check the EEPROM state for being MEMIF_IDLE . If the EEPROM state is not MEMIF_IDLE , the called function shall • raise the development error EEP_E_UNINIT if the module has not been initialized yet and if development error detection for the module Eep is enabled • raise the runtime error EEP_E_BUSY according to the EEPROM state • reject the service with E_NOT_OK (except Eep_SetMode() because this service has no return value).

requirement SWS_Eep_00036 [SWS_Eep_00036] 📄 PDF

The Eep module shall not buffer jobs. The Eep module shall accept only one job at a time. During job processing, the Eep module shall accept no other job.

requirement SWS_Eep_00037 [SWS_Eep_00037] 📄 PDF

The Eep module shall not buffer data to be read or written. The Eep module shall use application data buffers that are referenced by a pointer passed via the API.

requirement SWS_Eep_00042 [SWS_Eep_00042] 📄 PDF

The function Eep_SetMode shall set the EEPROM operation mode to the given Mode parameter. The function Eep_SetMode checks the EEPROM state according to requirement [SWS_Eep_00033].

requirement SWS_Eep_00044 [SWS_Eep_00044] 📄 PDF

The function Eep_Init shall set the EEPROM mode to the con- figured default mode.

requirement SWS_Eep_00045 [SWS_Eep_00045] 📄 PDF

The Eep module shall call the callback function defined in the configuration parameter EepJobEndNotification when a job has been completed with a positive result: • Read finished & OK • Write finished & OK • Erase finished & OK • Compare finished & data blocks are equal

requirement SWS_Eep_00046 [SWS_Eep_00046] 📄 PDF

The Eep module shall call the callback function defined in the configuration parameter EepJobErrorNotification when a job has been canceled or aborted with negative result: • Read aborted • Write aborted or failed • Erase aborted or failed • Compare aborted or data blocks are not equal.

requirement SWS_Eep_00049 [SWS_Eep_00049] 📄 PDF

Notification callback functions are configurable through their cor- responding configuration parameters. If no callback function is configured, there shall be no asynchronous notification.

requirement SWS_Eep_00051 [SWS_Eep_00051] 📄 PDF

In normal EEPROM mode, the Eep module shall read within one job processing cycle a number of bytes specified by the parameter EepNormalRead- BlockSize .

requirement SWS_Eep_00052 [SWS_Eep_00052] 📄 PDF

For an Eep module driving an external EEPROM through SPI: In normal EEPROM mode, the Eep module shall access the external EEPROM by usage of SPI channels that are configured for normal access to the SPI EEPROM.

requirement SWS_Eep_00053 [SWS_Eep_00053] 📄 PDF

For an Eep module driving an external EEPROM through SPI: The Eep's configuration shall be such that the value of the configuration parameter EepNormalReadBlockSize fits to the number of bytes that are readable in normal SPI mode.

requirement SWS_Eep_00054 [SWS_Eep_00054] 📄 PDF

In fast EEPROM mode, the Eep module shall read within one job processing cycle a number of bytes specified by the parameter EepFastReadBlock- Size .

requirement SWS_Eep_00055 [SWS_Eep_00055] 📄 PDF

For an Eep module driving an external EEPROM through SPI: In fast EEPROM mode, the Eep module shall access the external EEPROM by usage of SPI channels that are configured for burst access to the SPI EEPROM.

requirement SWS_Eep_00056 [SWS_Eep_00056] 📄 PDF

For an Eep module driving an external EEPROM through SPI: If the SPI access fails, the Eep module shall behave as specified in [SWS_Eep_00068].

requirement SWS_Eep_00057 [SWS_Eep_00057] 📄 PDF

The Eep module shall only write (and erase) as many bytes to the EEPROM as supported by the EEPROM hardware within one job processing cycle. For internal EEPROMs, usually 1 data word can be written per time. Some external EEPROMs provide a RAM buffer (e.g. page buffer) that allows writing many bytes in one step.

requirement SWS_Eep_00058 [SWS_Eep_00058] 📄 PDF

When a read job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

requirement SWS_Eep_00059 [SWS_Eep_00059] 📄 PDF

The Eep module shall erase an EEPROM cell before writing to it if this is not done automatically by the EEPROM hardware.

requirement SWS_Eep_00060 [SWS_Eep_00060] 📄 PDF

If the value to be written to an EEPROM cell is already contained in the EEPROM cell, the Eep module should 1 skip the programming of that cell if it is configured to do so through the configuration parameter EepWriteCycleReduc- tion .

requirement SWS_Eep_00063 [SWS_Eep_00063] 📄 PDF

The Eep module shall preserve data of affected EEPROM cells by performing read – modify – write operations, if the number of bytes to be written are smaller than the erasable and/or writeable data units.

requirement SWS_Eep_00064 [SWS_Eep_00064] 📄 PDF

The Eep module shall keep the number of read – modify – write operations during writing a data block as small as possible.

requirement SWS_Eep_00068 [SWS_Eep_00068] 📄 PDF

When an error is detected during read job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

requirement SWS_Eep_00069 [SWS_Eep_00069] 📄 PDF

The Eep module shall erase only as many bytes to the EEPROM as supported by the EEPROM hardware within one job processing cycle.

requirement SWS_Eep_00070 [SWS_Eep_00070] 📄 PDF

The Eep module shall use block erase commands if supported by the EEPROM hardware and if the given parameters ( EepromAddress and Length ) are aligned to erasable blocks.

requirement SWS_Eep_00072 [SWS_Eep_00072] 📄 PDF

The Eep module shall preserve the contents of affected EEP- ROM cells by using read – modify – write operations, if the given erase parameters ( EepromAddress and Length ) do not align with the erasable data units.

requirement SWS_Eep_00073 [SWS_Eep_00073] 📄 PDF

For an Eep module driving an external EEPROM through SPI: The Eep's configuration shall be such that the value of the configuration parameter EepFastReadBlockSize fits to the number of bytes that are readable in burst SPI mode.

requirement SWS_Eep_00075 [SWS_Eep_00075] 📄 PDF

When it is detected during compare job processing that the com- pared data areas are not equal, the EEPROM driver shall abort the job, set the EEP- ROM state to MEMIF_IDLE and the job result to MEMIF_BLOCK_INCONSISTENT . If configured, the callback function Eep_JobErrorNotification shall be called.

requirement SWS_Eep_00082 [SWS_Eep_00082] 📄 PDF

The source code of external EEPROM drivers shall be indepen- dent of the microcontroller platform.

requirement SWS_Eep_00084 [SWS_Eep_00084] 📄 PDF

The configuration parameter EepMainFunctionPeriod (see [ECUC_Eep_00170]) shall be used for internal timing of the EEPROM driver (dead- line monitoring, write and erase timing etc.) if needed by the implementation and/or the underlying hardware.

requirement SWS_Eep_00088 [SWS_Eep_00088] 📄 PDF

The Eep SWS shall be valid both for internal and external EEP- ROMs. The Eep SWS defines asynchronous services for EEPROM operations (read/write/ erase/compare).

requirement SWS_Eep_00090 [SWS_Eep_00090] 📄 PDF

The Eep module shall preserve data of affected EEPROM cells by performing read – modify – write operations, if the given parameters ( EepromAddress and Length ) do not align with the erasable/writeable data units.

requirement SWS_Eep_00094 [SWS_Eep_00094] 📄 PDF

file (see [SWS_Eep_00095]). • All required SPI channels • All required SPI sequences • All required SPI jobs

requirement SWS_Eep_00095 [SWS_Eep_00095] 📄 PDF

file (see EEP038): • All SPI channels that are required for EEPROM access (read, write, erase). • Those channels shall be linked to construct SPI jobs that are linked with chip selected handling. This depends on the specific EEPROM device. • Those jobs shall be assigned to SPI sequences to be scheduled for SPI transfer. A complete list of required parameters is specified in the SPI Handler/Driver Software Specification.

requirement SWS_Eep_00097 [SWS_Eep_00097] 📄 PDF

In normal EEPROM mode, the Eep module shall write (and erase) within one job processing cycle a number of bytes specified by the parameter EepNor- malWriteBlockSize .

requirement SWS_Eep_00098 [SWS_Eep_00098] 📄 PDF

In fast EEPROM mode, the Eep module shall write (and erase) within one job processing cycle a number of bytes specified by the parameter Eep- FastWriteBlockSize .

requirement SWS_Eep_00113 [SWS_Eep_00113] 📄 PDF

The type Eep_AddressType shall have 0 as lower limit for each EEPROM device.

requirement SWS_Eep_00115 [SWS_Eep_00115] 📄 PDF

The Eep's user shall not call the function Eep_Init during a running operation.

requirement SWS_Eep_00116 [SWS_Eep_00116] 📄 PDF

The Eep's user shall not call the function Eep_SetMode during a running operation.

requirement SWS_Eep_00117 [SWS_Eep_00117] 📄 PDF

The Eep's user shall only call Eep_Read after the Eep module has been been initialized.

requirement SWS_Eep_00118 [SWS_Eep_00118] 📄 PDF

The Eep's user shall not call the function Eep_Read during a running Eep module job (read/write/erase/compare).

requirement SWS_Eep_00119 [SWS_Eep_00119] 📄 PDF

The Eep module's user shall only call the function Eep_Write after the Eep module has been initialized.

requirement SWS_Eep_00120 [SWS_Eep_00120] 📄 PDF

The Eep module's user shall not call the function Eep_Write during a running Eep module job (read/write/erase/compare).

requirement SWS_Eep_00121 [SWS_Eep_00121] 📄 PDF

The Eep module's user shall only call the function Eep_Erase after the Eep module has been initialized.

requirement SWS_Eep_00122 [SWS_Eep_00122] 📄 PDF

The Eep module's user shall not call the function Eep_Erase during a running Eep job (read/write/erase/compare).

requirement SWS_Eep_00123 [SWS_Eep_00123] 📄 PDF

The Eep module's user shall only call the function Eep_Compare after the Eep module has been initialized.

requirement SWS_Eep_00124 [SWS_Eep_00124] 📄 PDF

The Eep module's user shall not call the function Eep_Compare during a running Eep job (read/write/erase/compare).

requirement SWS_Eep_00126 [SWS_Eep_00126] 📄 PDF

The callback function defined in the configuration parameter EepJobEndNotification shall be callable on interrupt level.

requirement SWS_Eep_00127 [SWS_Eep_00127] 📄 PDF

The callback function defined in the configuration parameter EepJobErrorNotification shall be callable on interrupt level.

requirement SWS_Eep_00128 [SWS_Eep_00128] 📄 PDF

The Eep module shall allow to be configured for inter- rupt or polling controlled job processing (if this is supported by the EEP- ROM hardware) through the configuration parameter EepUseInterrupts (see [ECUC_Eep_00163]).

requirement SWS_Eep_00129 [SWS_Eep_00129] 📄 PDF

If interrupt controlled job processing is supported and enabled, the external interrupt service routine located in Eep_Irq.c shall call an additional job processing function.

requirement SWS_Eep_00130 [SWS_Eep_00130] 📄 PDF

The Eep module shall provide two different read modes: • normal mode • fast mode

requirement SWS_Eep_00132 [SWS_Eep_00132] 📄 PDF

For an Eep module driving an external EEPROM: in case the external EEPROM does not support the burst mode, the Eep module shall accept a selection of fast read mode, but shall behave the same as in normal mode (don't care of mode parameter).

requirement SWS_Eep_00133 [SWS_Eep_00133] 📄 PDF

The Eep module shall provide two different write modes: • normal mode • fast mode

requirement SWS_Eep_00134 [SWS_Eep_00134] 📄 PDF

For the case of an Eep module driving an external EEPROM: if the external EEPROMs does not provide burst mode, the Eep module shall accept a selection of fast mode, but shall behave the same as in normal mode (don't care of mode parameter).

requirement SWS_Eep_00136 [SWS_Eep_00136] 📄 PDF

The Eep module's user shall not call the Eep_Cancel() function during a running Eep_MainFunction() function. [SWS_Eep_00136] can be achieved by one of the following scheduling configurations: • Possibility 1: the job functions of the NVRAM manager and the EEPROM driver are synchronized (e.g. called sequentially within one task) • Possibility 2: the task that calls the Eep_MainFunction function cannot be pre- empted by another task.

requirement SWS_Eep_00137 [SWS_Eep_00137] 📄 PDF

In case the Eep module support an SPI external device, the Eep module shall provide additional callback notifications according to the SPI Handler/- Driver specification requirements.

requirement SWS_Eep_00138 [SWS_Eep_00138] 📄 PDF

Module Header File Imported Type Rte_Dem_Type.h Dem_EventIdType Dem Rte_Dem_Type.h Dem_EventStatusType MemIf.h MemIf_JobResultType (obsolete) MemIf.h MemIf_ModeType (obsolete) MemIf MemIf.h MemIf_StatusType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType

requirement SWS_Eep_00154 [SWS_Eep_00154] 📄 PDF

Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/Dem ConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING) Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called.

requirement SWS_Eep_00200 [SWS_Eep_00200] 📄 PDF

The production error code EEP_E_ERASE_FAILED shall be re- ported when the EEPROM erase function failed.

requirement SWS_Eep_00201 [SWS_Eep_00201] 📄 PDF

The production error code EEP_E_WRITE_FAILED shall be re- ported when the EEPROM write function failed.

requirement SWS_Eep_00202 [SWS_Eep_00202] 📄 PDF

The production error code EEP_E_READ_FAILED shall be re- ported when the EEPROM read function failed.

requirement SWS_Eep_00203 [SWS_Eep_00203] 📄 PDF

The production error code EEP_E_COMPARE_FAILED shall be reported when the EEPROM compare function failed.

requirement SWS_Eep_00204 [SWS_Eep_00204] 📄 PDF

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_ERASE_FAILED to the DEM if an EEPROM erase job fails due to a hardware error.

requirement SWS_Eep_00205 [SWS_Eep_00205] 📄 PDF

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_WRITE_FAILED to the DEM if an EEPROM write job fails due to a hardware error.

requirement SWS_Eep_00206 [SWS_Eep_00206] 📄 PDF

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_READ_FAILED to the DEM if an EEPROM read job fails due to a hardware error.

requirement SWS_Eep_00207 [SWS_Eep_00207] 📄 PDF

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_COMPARE_FAILED to the DEM if an EEPROM compare job fails due to a hardware error.

requirement SWS_Eep_00215 [SWS_Eep_00215] 📄 PDF

The function Eep_Cancel shall cancel an ongoing EEPROM read, write, erase or compare job.

requirement SWS_Eep_00216 [SWS_Eep_00216] 📄 PDF

If configured, Eep_Cancel shall call the error notification func- tion defined in EepJobErrorNotification in order to inform the caller about the cancelation of a job.

requirement SWS_Eep_00217 [SWS_Eep_00217] 📄 PDF

The EEPROM module shall add a device specific base address to the address type Eep_AddressType if necessary.

requirement SWS_Eep_00219 [SWS_Eep_00219] 📄 PDF

When a write job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

requirement SWS_Eep_00220 [SWS_Eep_00220] 📄 PDF

When an erase job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

requirement SWS_Eep_00221 [SWS_Eep_00221] 📄 PDF

When a compare job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_- JOB_OK . If configured, the Eep module shall call the notification defined in the config- uration parameter EepJobEndNotification .

requirement SWS_Eep_00222 [SWS_Eep_00222] 📄 PDF

When an error is detected during write job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

requirement SWS_Eep_00223 [SWS_Eep_00223] 📄 PDF

When an error is detected during erase job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

requirement SWS_Eep_00224 [SWS_Eep_00224] 📄 PDF

When an error is detected during compare job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

requirement SWS_Eep_00228 [SWS_Eep_00228] 📄 PDF

If the module implementation uses custom interrupt processing, the interrupt service routines shall be placed in Eep_Irq.c .

requirement SWS_Eep_00234 [SWS_Eep_00234] 📄 PDF

The runtime error code EEP_E_TIMEOUT shall be reported when the timeout supervision of a read, write, erase or compare job failed.

requirement SWS_Eep_00235 [SWS_Eep_00235] 📄 PDF

The function Eep_MainFunction shall provide a timeout moni- toring for the currently running job. That is it shall supervise the deadline of the read / compare / erase or write job.

requirement SWS_Eep_00236 [SWS_Eep_00236] 📄 PDF

The function Eep_MainFunction shall check whether the con- figured maximum erase time (see [ECUC_Eep_00178] EepEraseTime ) has been ex- ceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_TIMEOUT .

requirement SWS_Eep_00237 [SWS_Eep_00237] 📄 PDF

The function Eep_MainFunction shall check whether the ex- pected maximum write time (see note below) has been exceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_TIMEOUT .

requirement SWS_Eep_00238 [SWS_Eep_00238] 📄 PDF

The function Eep_MainFunction shall check whether the ex- pected maximum read / compare time (see note below) has been exceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_- TIMEOUT .

requirement SWS_Eep_00239 [SWS_Eep_00239] 📄 PDF

If development error detection for the module Eep is enabled, and if the function Eep_GetVersionInfo is called with a NULL Pointer, the function Eep_GetVersionInfo shall raise the development error EEP_E_PARAM_POINTER , otherwise (if no development error detection is enabled) it shall return without any action.

requirement SWS_Eep_00242 [SWS_Eep_00242] 📄 PDF

Error Name: EEP_E_ERASE_FAILED Short Description: EEPROM erase failed (HW) Long Description: The Eeprom module reports this error when EEPROM erase job fails due to a hardware error. Fail EEPROM erase job failed (see [SWS_Eep_00255]). Detection Criteria: Pass EEPROM erase job finished successfully (see [SWS_Eep_00244]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

requirement SWS_Eep_00243 [SWS_Eep_00243] 📄 PDF

Error Name: EEP_E_WRITE_FAILED Short Description: EEPROM write failed (HW) Long Description: The Eeprom module reports this error when EEPROM write job fails due to a hardware error. Fail EEPROM write job failed (see [SWS_Eep_00249]). Detection Criteria: Pass EEPROM write job finished successfully (see [SWS_Eep_00248]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

requirement SWS_Eep_00244 [SWS_Eep_00244] 📄 PDF

The production error code EEP_E_ERASE_FAILED shall be re- ported with PASSED when the Eeprom erase function was executed successfully.

requirement SWS_Eep_00245 [SWS_Eep_00245] 📄 PDF

Error Name: EEP_E_COMPARE_FAILED Short Description: EEPROM compare failed (HW) Long Description: The Eeprom module reports this error when EEPROM compare job fails due to a hardware error. Fail EEPROM compare job failed (see [SWS_Eep_00253]). Detection Criteria: Pass EEPROM compare job finished successfully (see [SWS_Eep_00254]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

requirement SWS_Eep_00246 [SWS_Eep_00246] 📄 PDF

If the underlying EEPROM technology requires a certain align- ment of the read address or length information and if the address and/or length pa- rameter for a read or compare Job are not correctly aligned, the function Eep_Main- Function shall internally compensate for this missing alignment, that is the function Eep_MainFunction shall provide byte-wise read access to the flash memory, regard- less of any alignment restrictions imposed by the Hardware.

requirement SWS_Eep_00248 [SWS_Eep_00248] 📄 PDF

The production error code EEP_E_WRITE_FAILED shall be re- ported with PASSED when the Eeprom write function was executed successfully.

requirement SWS_Eep_00249 [SWS_Eep_00249] 📄 PDF

The production error code EEP_E_WRITE_FAILED shall be re- ported with FAILED when the Eeprom write function failed

requirement SWS_Eep_00250 [SWS_Eep_00250] 📄 PDF

The production error code EEP_E_READ_FAILED shall be re- ported with FAILED when the Eeprom read function failed.

requirement SWS_Eep_00251 [SWS_Eep_00251] 📄 PDF

Type of error Related error code Error value API service called while driver still busy EEP_E_BUSY 0x21 Timeout exceeded EEP_E_TIMEOUT 0x22

requirement SWS_Eep_00252 [SWS_Eep_00252] 📄 PDF

The production error code EEP_E_READ_FAILED shall be re- ported with PASSED when the Eeprom read function was executed successfully.

requirement SWS_Eep_00253 [SWS_Eep_00253] 📄 PDF

The production error code EEP_E_COMPARE_FAILED shall be reported with FAILED when the Eeprom compare function failed.

requirement SWS_Eep_00254 [SWS_Eep_00254] 📄 PDF

The production error code EEP_E_COMPARE_FAILED shall be re- ported with PASSED when the Eeprom compare function was executed successfully.

requirement SWS_Eep_00255 [SWS_Eep_00255] 📄 PDF

The production error code EEP_E_ERASE_FAILED shall be re- ported with FAILED when the Eeprom erase function failed.

requirement SWS_Eep_00256 [SWS_Eep_00256] 📄 PDF

Eep driver shall handle data buffer alignment internally. Instead of imposing any requirements on a RAM buffers' alignments (as they are uint8*) it shall handle passed pointers as being just byte-aligned.

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

Record
AUTOSAR/AP/record/CP_MOD_Eep
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Eep@rel:R20-11#d1b7e737
Content hash
d1b7e737
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_EEPROMDriver.pdf#nameddest=SWS_Eep_00143

विषय मानचित्र

आरंभीकरण और स्थिति

3

चक्रीय

1

आवश्यकताएँ

119
SWS_Eep_00000SWS_Eep_00004SWS_Eep_00006SWS_Eep_00009SWS_Eep_00013SWS_Eep_00014SWS_Eep_00015SWS_Eep_00016SWS_Eep_00017SWS_Eep_00018SWS_Eep_00019SWS_Eep_00020SWS_Eep_00021SWS_Eep_00024SWS_Eep_00025SWS_Eep_00026SWS_Eep_00027SWS_Eep_00028SWS_Eep_00029SWS_Eep_00030SWS_Eep_00031SWS_Eep_00032SWS_Eep_00033SWS_Eep_00036SWS_Eep_00037SWS_Eep_00042SWS_Eep_00044SWS_Eep_00045SWS_Eep_00046SWS_Eep_00049SWS_Eep_00051SWS_Eep_00052SWS_Eep_00053SWS_Eep_00054SWS_Eep_00055SWS_Eep_00056SWS_Eep_00057SWS_Eep_00058SWS_Eep_00059SWS_Eep_00060SWS_Eep_00063SWS_Eep_00064SWS_Eep_00068SWS_Eep_00069SWS_Eep_00070SWS_Eep_00072SWS_Eep_00073SWS_Eep_00075SWS_Eep_00082SWS_Eep_00084SWS_Eep_00088SWS_Eep_00090SWS_Eep_00094SWS_Eep_00095SWS_Eep_00097SWS_Eep_00098SWS_Eep_00113SWS_Eep_00115SWS_Eep_00116SWS_Eep_00117SWS_Eep_00118SWS_Eep_00119SWS_Eep_00120SWS_Eep_00121SWS_Eep_00122SWS_Eep_00123SWS_Eep_00124SWS_Eep_00126SWS_Eep_00127SWS_Eep_00128SWS_Eep_00129SWS_Eep_00130SWS_Eep_00132SWS_Eep_00133SWS_Eep_00134SWS_Eep_00136SWS_Eep_00137SWS_Eep_00138SWS_Eep_00154SWS_Eep_00155SWS_Eep_00200SWS_Eep_00201SWS_Eep_00202SWS_Eep_00203SWS_Eep_00204SWS_Eep_00205SWS_Eep_00206SWS_Eep_00207SWS_Eep_00215SWS_Eep_00216SWS_Eep_00217SWS_Eep_00219SWS_Eep_00220SWS_Eep_00221SWS_Eep_00222SWS_Eep_00223SWS_Eep_00224SWS_Eep_00228SWS_Eep_00234SWS_Eep_00235SWS_Eep_00236SWS_Eep_00237SWS_Eep_00238SWS_Eep_00239SWS_Eep_00242SWS_Eep_00243SWS_Eep_00244SWS_Eep_00245SWS_Eep_00246SWS_Eep_00248SWS_Eep_00249SWS_Eep_00250SWS_Eep_00251SWS_Eep_00252SWS_Eep_00253SWS_Eep_00254SWS_Eep_00255SWS_Eep_00256SWS_Eep_NA_00241

विवरण दृश्य

रूपरेखा में कोई प्रविष्टि चुनें।

आरंभीकरण और स्थिति

Eep_GetStatus फ़ंक्शन

Returns the EEPROM status.

MemIf_StatusType Eep_GetStatus(void);
Eep_GetVersionInfo फ़ंक्शन

Service to get the version information of this module.

void Eep_GetVersionInfo(Std_VersionInfoType* versioninfo);
Eep_Init फ़ंक्शन

Service for EEPROM initialization.

void Eep_Init(const Eep_ConfigType* ConfigPtr);

सेवाएँ

Eep_Cancel फ़ंक्शन

Cancels a running job.

void Eep_Cancel(void);
Eep_Compare फ़ंक्शन

Compares a data block in EEPROM with an EEPROM block in the memory.

Std_ReturnType Eep_Compare(Eep_AddressType EepromAddress, const uint8* DataBufferPtr, Eep_LengthType Length);
Eep_Erase फ़ंक्शन

Service for erasing EEPROM sections.

Std_ReturnType Eep_Erase(Eep_AddressType EepromAddress, Eep_LengthType Length);
Eep_GetJobResult फ़ंक्शन

This service returns the result of the last job.

MemIf_JobResultType Eep_GetJobResult(void);
Eep_JobEndNotification फ़ंक्शन

This callback function provided by the module user is called when a job has been completed with a positive result.

void Eep_JobEndNotification(void);
Eep_JobErrorNotification फ़ंक्शन

This callback function provided by the module user is called when a job has been canceled or finished with negative result.

void Eep_JobErrorNotification(void);
Eep_Read फ़ंक्शन

Reads from EEPROM.

Std_ReturnType Eep_Read(Eep_AddressType EepromAddress, uint8* DataBufferPtr, Eep_LengthType Length);
Eep_SetMode फ़ंक्शन

Sets the mode.

void Eep_SetMode(MemIf_ModeType Mode);
Eep_Write फ़ंक्शन

Writes to EEPROM.

Std_ReturnType Eep_Write(Eep_AddressType EepromAddress, const uint8* DataBufferPtr, Eep_LengthType Length);

चक्रीय

Eep_MainFunction फ़ंक्शन

Service to perform the processing of the EEPROM jobs (read/write/erase/compare) .

void Eep_MainFunction(void);

टाइप

Eep_AddressType टाइप

Used as address offset from the configured EEPROM base address to access a certain EEPROM memory area.

Eep_ConfigType टाइप

This is the type of the external data structure containing the initialization data for the EEPROM driver.

Eep_LengthType टाइप

Specifies the number of bytes to read/write/erase/compare.

आवश्यकताएँ

SWS_Eep_00000 requirement

Type of error Related error code Error value Invalid configuration set selection EEP_E_INIT_FAILED 0x10 Invalid configuration set selection EEP_E_PARAM_ADDRESS 0x11 Invalid configuration set selection EEP_E_PARAM_DATA 0x12 Invalid configuration set selection EEP_E_PARAM_LENGTH 0x13 API service called without module initialization EEP_E_UNINIT 0x20 API service called with a NULL pointer EEP_E_PARAM_POINTER 0x23

SWS_Eep_00004 requirement

The function Eep_Init shall initialize all EEPROM relevant reg- isters with the values of the structure referenced by the parameter ConfigPtr .

SWS_Eep_00006 requirement

After having finished the module initialization, the function Eep_- Init shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_OK .

SWS_Eep_00009 requirement

The function Eep_Read shall copy the given parameters, initiate a read job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

SWS_Eep_00013 requirement

The Eep module shall execute the read job asynchronously within the Eep module's job processing function. During job processing the Eep module shall read a data block of size Length from EepromAddress + EEPROM base address to * DataBufferPtr . The function Eep_Read checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Read checks the EEPROM state according to requirement [SWS_Eep_00033].

SWS_Eep_00014 requirement

The function Eep_Write shall copy the given parameters, initiate a write job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

SWS_Eep_00015 requirement

The Eep module shall execute the write job asynchronously within the Eep module's job processing function. During job processing the Eep module shall write a data block of size Length from * DataBufferPtr to EepromAddress + EEP- ROM base address. The function Eep_Write checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Write checks the EEPROM state according to requirement [SWS_Eep_00033].

SWS_Eep_00016 requirement

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that DataBufferPtr is not NULL. If DataBufferPtr is NULL, they shall raise development error EEP_E_PARAM_DATA , otherwise (if no development error detection is enabled) it shall return with E_NOT_OK .

SWS_Eep_00017 requirement

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that EepromAddress is valid. If EepromAddress is not within the valid EEP- ROM address range they shall raise development error EEP_E_PARAM_ADDRESS , oth- erwise (if no development error detection is enabled) it shall return with E_NOT_OK .

SWS_Eep_00018 requirement

If development error detection for the module Eep is enabled: the functions Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check that the parameter Length is within the specified minimum and maximum val- ues: • Min.: 1 • Max.: EepSize - EepromAddress If the parameter Length is not within the specified minimum and maximum values, they shall raise development error EEP_E_PARAM_LENGTH , otherwise (if no development error detection is enabled) it shall return with E_NOT_OK .

SWS_Eep_00019 requirement

The function Eep_Erase shall copy the given parameters, initiate an erase job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_- JOB_PENDING and return.

SWS_Eep_00020 requirement

The Eep module shall execute the erase job asynchronously within the Eep module's job processing function. The Eep module shall erase an EEP- ROM block starting from EepromAddress + EEPROM base address of size Length . The function Eep_Erase checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The function Eep_Erase checks the EEPROM state according to requirement [SWS_Eep_00033].

SWS_Eep_00021 requirement

The function Eep_Cancel shall abort a running job syn- chronously so that directly after returning from this function a new job can be requested by the upper layer.

SWS_Eep_00024 requirement

The function Eep_GetJobResult shall synchronously return the result of the last job that has been accepted by the Eep module.

SWS_Eep_00025 requirement

The function Eep_Compare shall copy the given parameters, ini- tiate a compare job, set the EEPROM status to MEMIF_BUSY , set the job result to MEMIF_JOB_PENDING and return.

SWS_Eep_00026 requirement

The Eep module shall execute the compare job asynchronously within the Eep module's job processing function. During job processing the Eep module shall compare the EEPROM data block at EepromAddress + EEPROM base address of size Length with the data block at * DataBufferPtr of the same length. The service Eep_Compare checks the API parameters according to requirements [SWS_Eep_00016], [SWS_Eep_00017], [SWS_Eep_00018]. The service Eep_Compare checks the EEPROM state according to requirement [SWS_Eep_00033].

SWS_Eep_00027 requirement

The function Eep_Cancel shall set the EEP module state to MEMIF_IDLE .

SWS_Eep_00028 requirement

The function Eep_Cancel shall set the job result to MEMIF_- JOB_CANCELED if the job result currently has the value MEMIF_JOB_PENDING . Other- wise it shall leave the job result unchanged.

SWS_Eep_00029 requirement

The function Eep_GetStatus shall return the EEPROM status synchronously.

SWS_Eep_00030 requirement

The function Eep_MainFunction shall perform the processing of the EEPROM read, write, erase and compare jobs.

SWS_Eep_00031 requirement

When a job has been initiated, the Eep's user shall call the func- tion Eep_MainFunction cyclically until the job is finished.

SWS_Eep_00032 requirement

The function Eep_MainFunction shall return without action if no job is pending.

SWS_Eep_00033 requirement

The functions Eep_SetMode() , Eep_Read() , Eep_Write() , Eep_Compare() and Eep_Erase() shall check the EEPROM state for being MEMIF_IDLE . If the EEPROM state is not MEMIF_IDLE , the called function shall • raise the development error EEP_E_UNINIT if the module has not been initialized yet and if development error detection for the module Eep is enabled • raise the runtime error EEP_E_BUSY according to the EEPROM state • reject the service with E_NOT_OK (except Eep_SetMode() because this service has no return value).

SWS_Eep_00036 requirement

The Eep module shall not buffer jobs. The Eep module shall accept only one job at a time. During job processing, the Eep module shall accept no other job.

SWS_Eep_00037 requirement

The Eep module shall not buffer data to be read or written. The Eep module shall use application data buffers that are referenced by a pointer passed via the API.

SWS_Eep_00042 requirement

The function Eep_SetMode shall set the EEPROM operation mode to the given Mode parameter. The function Eep_SetMode checks the EEPROM state according to requirement [SWS_Eep_00033].

SWS_Eep_00044 requirement

The function Eep_Init shall set the EEPROM mode to the con- figured default mode.

SWS_Eep_00045 requirement

The Eep module shall call the callback function defined in the configuration parameter EepJobEndNotification when a job has been completed with a positive result: • Read finished & OK • Write finished & OK • Erase finished & OK • Compare finished & data blocks are equal

SWS_Eep_00046 requirement

The Eep module shall call the callback function defined in the configuration parameter EepJobErrorNotification when a job has been canceled or aborted with negative result: • Read aborted • Write aborted or failed • Erase aborted or failed • Compare aborted or data blocks are not equal.

SWS_Eep_00049 requirement

Notification callback functions are configurable through their cor- responding configuration parameters. If no callback function is configured, there shall be no asynchronous notification.

SWS_Eep_00051 requirement

In normal EEPROM mode, the Eep module shall read within one job processing cycle a number of bytes specified by the parameter EepNormalRead- BlockSize .

SWS_Eep_00052 requirement

For an Eep module driving an external EEPROM through SPI: In normal EEPROM mode, the Eep module shall access the external EEPROM by usage of SPI channels that are configured for normal access to the SPI EEPROM.

SWS_Eep_00053 requirement

For an Eep module driving an external EEPROM through SPI: The Eep's configuration shall be such that the value of the configuration parameter EepNormalReadBlockSize fits to the number of bytes that are readable in normal SPI mode.

SWS_Eep_00054 requirement

In fast EEPROM mode, the Eep module shall read within one job processing cycle a number of bytes specified by the parameter EepFastReadBlock- Size .

SWS_Eep_00055 requirement

For an Eep module driving an external EEPROM through SPI: In fast EEPROM mode, the Eep module shall access the external EEPROM by usage of SPI channels that are configured for burst access to the SPI EEPROM.

SWS_Eep_00056 requirement

For an Eep module driving an external EEPROM through SPI: If the SPI access fails, the Eep module shall behave as specified in [SWS_Eep_00068].

SWS_Eep_00057 requirement

The Eep module shall only write (and erase) as many bytes to the EEPROM as supported by the EEPROM hardware within one job processing cycle. For internal EEPROMs, usually 1 data word can be written per time. Some external EEPROMs provide a RAM buffer (e.g. page buffer) that allows writing many bytes in one step.

SWS_Eep_00058 requirement

When a read job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

SWS_Eep_00059 requirement

The Eep module shall erase an EEPROM cell before writing to it if this is not done automatically by the EEPROM hardware.

SWS_Eep_00060 requirement

If the value to be written to an EEPROM cell is already contained in the EEPROM cell, the Eep module should 1 skip the programming of that cell if it is configured to do so through the configuration parameter EepWriteCycleReduc- tion .

SWS_Eep_00063 requirement

The Eep module shall preserve data of affected EEPROM cells by performing read – modify – write operations, if the number of bytes to be written are smaller than the erasable and/or writeable data units.

SWS_Eep_00064 requirement

The Eep module shall keep the number of read – modify – write operations during writing a data block as small as possible.

SWS_Eep_00068 requirement

When an error is detected during read job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

SWS_Eep_00069 requirement

The Eep module shall erase only as many bytes to the EEPROM as supported by the EEPROM hardware within one job processing cycle.

SWS_Eep_00070 requirement

The Eep module shall use block erase commands if supported by the EEPROM hardware and if the given parameters ( EepromAddress and Length ) are aligned to erasable blocks.

SWS_Eep_00072 requirement

The Eep module shall preserve the contents of affected EEP- ROM cells by using read – modify – write operations, if the given erase parameters ( EepromAddress and Length ) do not align with the erasable data units.

SWS_Eep_00073 requirement

For an Eep module driving an external EEPROM through SPI: The Eep's configuration shall be such that the value of the configuration parameter EepFastReadBlockSize fits to the number of bytes that are readable in burst SPI mode.

SWS_Eep_00075 requirement

When it is detected during compare job processing that the com- pared data areas are not equal, the EEPROM driver shall abort the job, set the EEP- ROM state to MEMIF_IDLE and the job result to MEMIF_BLOCK_INCONSISTENT . If configured, the callback function Eep_JobErrorNotification shall be called.

SWS_Eep_00082 requirement

The source code of external EEPROM drivers shall be indepen- dent of the microcontroller platform.

SWS_Eep_00084 requirement

The configuration parameter EepMainFunctionPeriod (see [ECUC_Eep_00170]) shall be used for internal timing of the EEPROM driver (dead- line monitoring, write and erase timing etc.) if needed by the implementation and/or the underlying hardware.

SWS_Eep_00088 requirement

The Eep SWS shall be valid both for internal and external EEP- ROMs. The Eep SWS defines asynchronous services for EEPROM operations (read/write/ erase/compare).

SWS_Eep_00090 requirement

The Eep module shall preserve data of affected EEPROM cells by performing read – modify – write operations, if the given parameters ( EepromAddress and Length ) do not align with the erasable/writeable data units.

SWS_Eep_00094 requirement

file (see [SWS_Eep_00095]). • All required SPI channels • All required SPI sequences • All required SPI jobs

SWS_Eep_00095 requirement

file (see EEP038): • All SPI channels that are required for EEPROM access (read, write, erase). • Those channels shall be linked to construct SPI jobs that are linked with chip selected handling. This depends on the specific EEPROM device. • Those jobs shall be assigned to SPI sequences to be scheduled for SPI transfer. A complete list of required parameters is specified in the SPI Handler/Driver Software Specification.

SWS_Eep_00097 requirement

In normal EEPROM mode, the Eep module shall write (and erase) within one job processing cycle a number of bytes specified by the parameter EepNor- malWriteBlockSize .

SWS_Eep_00098 requirement

In fast EEPROM mode, the Eep module shall write (and erase) within one job processing cycle a number of bytes specified by the parameter Eep- FastWriteBlockSize .

SWS_Eep_00113 requirement

The type Eep_AddressType shall have 0 as lower limit for each EEPROM device.

SWS_Eep_00115 requirement

The Eep's user shall not call the function Eep_Init during a running operation.

SWS_Eep_00116 requirement

The Eep's user shall not call the function Eep_SetMode during a running operation.

SWS_Eep_00117 requirement

The Eep's user shall only call Eep_Read after the Eep module has been been initialized.

SWS_Eep_00118 requirement

The Eep's user shall not call the function Eep_Read during a running Eep module job (read/write/erase/compare).

SWS_Eep_00119 requirement

The Eep module's user shall only call the function Eep_Write after the Eep module has been initialized.

SWS_Eep_00120 requirement

The Eep module's user shall not call the function Eep_Write during a running Eep module job (read/write/erase/compare).

SWS_Eep_00121 requirement

The Eep module's user shall only call the function Eep_Erase after the Eep module has been initialized.

SWS_Eep_00122 requirement

The Eep module's user shall not call the function Eep_Erase during a running Eep job (read/write/erase/compare).

SWS_Eep_00123 requirement

The Eep module's user shall only call the function Eep_Compare after the Eep module has been initialized.

SWS_Eep_00124 requirement

The Eep module's user shall not call the function Eep_Compare during a running Eep job (read/write/erase/compare).

SWS_Eep_00126 requirement

The callback function defined in the configuration parameter EepJobEndNotification shall be callable on interrupt level.

SWS_Eep_00127 requirement

The callback function defined in the configuration parameter EepJobErrorNotification shall be callable on interrupt level.

SWS_Eep_00128 requirement

The Eep module shall allow to be configured for inter- rupt or polling controlled job processing (if this is supported by the EEP- ROM hardware) through the configuration parameter EepUseInterrupts (see [ECUC_Eep_00163]).

SWS_Eep_00129 requirement

If interrupt controlled job processing is supported and enabled, the external interrupt service routine located in Eep_Irq.c shall call an additional job processing function.

SWS_Eep_00130 requirement

The Eep module shall provide two different read modes: • normal mode • fast mode

SWS_Eep_00132 requirement

For an Eep module driving an external EEPROM: in case the external EEPROM does not support the burst mode, the Eep module shall accept a selection of fast read mode, but shall behave the same as in normal mode (don't care of mode parameter).

SWS_Eep_00133 requirement

The Eep module shall provide two different write modes: • normal mode • fast mode

SWS_Eep_00134 requirement

For the case of an Eep module driving an external EEPROM: if the external EEPROMs does not provide burst mode, the Eep module shall accept a selection of fast mode, but shall behave the same as in normal mode (don't care of mode parameter).

SWS_Eep_00136 requirement

The Eep module's user shall not call the Eep_Cancel() function during a running Eep_MainFunction() function. [SWS_Eep_00136] can be achieved by one of the following scheduling configurations: • Possibility 1: the job functions of the NVRAM manager and the EEPROM driver are synchronized (e.g. called sequentially within one task) • Possibility 2: the task that calls the Eep_MainFunction function cannot be pre- empted by another task.

SWS_Eep_00137 requirement

In case the Eep module support an SPI external device, the Eep module shall provide additional callback notifications according to the SPI Handler/- Driver specification requirements.

SWS_Eep_00138 requirement

Module Header File Imported Type Rte_Dem_Type.h Dem_EventIdType Dem Rte_Dem_Type.h Dem_EventStatusType MemIf.h MemIf_JobResultType (obsolete) MemIf.h MemIf_ModeType (obsolete) MemIf MemIf.h MemIf_StatusType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType

SWS_Eep_00154 requirement

Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/Dem ConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING) Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called.

SWS_Eep_00155 requirement

Det_ReportError Det.h Service to report development errors.

SWS_Eep_00200 requirement

The production error code EEP_E_ERASE_FAILED shall be re- ported when the EEPROM erase function failed.

SWS_Eep_00201 requirement

The production error code EEP_E_WRITE_FAILED shall be re- ported when the EEPROM write function failed.

SWS_Eep_00202 requirement

The production error code EEP_E_READ_FAILED shall be re- ported when the EEPROM read function failed.

SWS_Eep_00203 requirement

The production error code EEP_E_COMPARE_FAILED shall be reported when the EEPROM compare function failed.

SWS_Eep_00204 requirement

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_ERASE_FAILED to the DEM if an EEPROM erase job fails due to a hardware error.

SWS_Eep_00205 requirement

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_WRITE_FAILED to the DEM if an EEPROM write job fails due to a hardware error.

SWS_Eep_00206 requirement

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_READ_FAILED to the DEM if an EEPROM read job fails due to a hardware error.

SWS_Eep_00207 requirement

The function Eep_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code EEP_E_COMPARE_FAILED to the DEM if an EEPROM compare job fails due to a hardware error.

SWS_Eep_00215 requirement

The function Eep_Cancel shall cancel an ongoing EEPROM read, write, erase or compare job.

SWS_Eep_00216 requirement

If configured, Eep_Cancel shall call the error notification func- tion defined in EepJobErrorNotification in order to inform the caller about the cancelation of a job.

SWS_Eep_00217 requirement

The EEPROM module shall add a device specific base address to the address type Eep_AddressType if necessary.

SWS_Eep_00219 requirement

When a write job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

SWS_Eep_00220 requirement

When an erase job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_- OK . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobEndNotification .

SWS_Eep_00221 requirement

When a compare job is finished successfully, the Eep module shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_- JOB_OK . If configured, the Eep module shall call the notification defined in the config- uration parameter EepJobEndNotification .

SWS_Eep_00222 requirement

When an error is detected during write job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

SWS_Eep_00223 requirement

When an error is detected during erase job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

SWS_Eep_00224 requirement

When an error is detected during compare job processing, the Eep module shall abort the job, shall set the EEPROM state to MEMIF_IDLE and shall set the job result to MEMIF_JOB_FAILED . If configured, the Eep module shall call the notification defined in the configuration parameter EepJobErrorNotification .

SWS_Eep_00228 requirement

If the module implementation uses custom interrupt processing, the interrupt service routines shall be placed in Eep_Irq.c .

SWS_Eep_00234 requirement

The runtime error code EEP_E_TIMEOUT shall be reported when the timeout supervision of a read, write, erase or compare job failed.

SWS_Eep_00235 requirement

The function Eep_MainFunction shall provide a timeout moni- toring for the currently running job. That is it shall supervise the deadline of the read / compare / erase or write job.

SWS_Eep_00236 requirement

The function Eep_MainFunction shall check whether the con- figured maximum erase time (see [ECUC_Eep_00178] EepEraseTime ) has been ex- ceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_TIMEOUT .

SWS_Eep_00237 requirement

The function Eep_MainFunction shall check whether the ex- pected maximum write time (see note below) has been exceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_TIMEOUT .

SWS_Eep_00238 requirement

The function Eep_MainFunction shall check whether the ex- pected maximum read / compare time (see note below) has been exceeded. If this is the case, the function Eep_MainFunction shall raise the runtime error EEP_E_- TIMEOUT .

SWS_Eep_00239 requirement

If development error detection for the module Eep is enabled, and if the function Eep_GetVersionInfo is called with a NULL Pointer, the function Eep_GetVersionInfo shall raise the development error EEP_E_PARAM_POINTER , otherwise (if no development error detection is enabled) it shall return without any action.

SWS_Eep_00242 requirement

Error Name: EEP_E_ERASE_FAILED Short Description: EEPROM erase failed (HW) Long Description: The Eeprom module reports this error when EEPROM erase job fails due to a hardware error. Fail EEPROM erase job failed (see [SWS_Eep_00255]). Detection Criteria: Pass EEPROM erase job finished successfully (see [SWS_Eep_00244]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

SWS_Eep_00243 requirement

Error Name: EEP_E_WRITE_FAILED Short Description: EEPROM write failed (HW) Long Description: The Eeprom module reports this error when EEPROM write job fails due to a hardware error. Fail EEPROM write job failed (see [SWS_Eep_00249]). Detection Criteria: Pass EEPROM write job finished successfully (see [SWS_Eep_00248]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

SWS_Eep_00244 requirement

The production error code EEP_E_ERASE_FAILED shall be re- ported with PASSED when the Eeprom erase function was executed successfully.

SWS_Eep_00245 requirement

Error Name: EEP_E_COMPARE_FAILED Short Description: EEPROM compare failed (HW) Long Description: The Eeprom module reports this error when EEPROM compare job fails due to a hardware error. Fail EEPROM compare job failed (see [SWS_Eep_00253]). Detection Criteria: Pass EEPROM compare job finished successfully (see [SWS_Eep_00254]). Secondary Parameters: N/A Time Required: N/A Monitor Frequency: Implementation specific

SWS_Eep_00246 requirement

If the underlying EEPROM technology requires a certain align- ment of the read address or length information and if the address and/or length pa- rameter for a read or compare Job are not correctly aligned, the function Eep_Main- Function shall internally compensate for this missing alignment, that is the function Eep_MainFunction shall provide byte-wise read access to the flash memory, regard- less of any alignment restrictions imposed by the Hardware.

SWS_Eep_00248 requirement

The production error code EEP_E_WRITE_FAILED shall be re- ported with PASSED when the Eeprom write function was executed successfully.

SWS_Eep_00249 requirement

The production error code EEP_E_WRITE_FAILED shall be re- ported with FAILED when the Eeprom write function failed

SWS_Eep_00250 requirement

The production error code EEP_E_READ_FAILED shall be re- ported with FAILED when the Eeprom read function failed.

SWS_Eep_00251 requirement

Type of error Related error code Error value API service called while driver still busy EEP_E_BUSY 0x21 Timeout exceeded EEP_E_TIMEOUT 0x22

SWS_Eep_00252 requirement

The production error code EEP_E_READ_FAILED shall be re- ported with PASSED when the Eeprom read function was executed successfully.

SWS_Eep_00253 requirement

The production error code EEP_E_COMPARE_FAILED shall be reported with FAILED when the Eeprom compare function failed.

SWS_Eep_00254 requirement

The production error code EEP_E_COMPARE_FAILED shall be re- ported with PASSED when the Eeprom compare function was executed successfully.

SWS_Eep_00255 requirement

The production error code EEP_E_ERASE_FAILED shall be re- ported with FAILED when the Eeprom erase function failed.

SWS_Eep_00256 requirement

Eep driver shall handle data buffer alignment internally. Instead of imposing any requirements on a RAM buffers' alignments (as they are uint8*) it shall handle passed pointers as being just byte-aligned.

SWS_Eep_NA_00241 requirement

These requirements are not applicable to this specifica- tion.