Memory Driver (Mem)
AUTOSAR Classic Memory Drivers-Modul Memory Driver (Mem, Spezifikation: AUTOSAR_CP_SWS_MemoryDriver.pdf, AUTOSAR_SWS_MemoryDriver.pdf).
Funktionen — Übersicht
void Mem_Init (const Mem_ConfigType* configPtr);Initialization function - initializes all variables and sets the module state to initialized.void Mem_GetVersionInfo (Std_VersionInfoType* versionInfoPtr);Service to return the version information of the Mem module.void Mem_MainFunction (void);Service to handle the requested jobs and the internal management operations.Mem_JobResultType Mem_GetJobResult (Mem_InstanceIdType instanceId);Service to return results of the most recent job.Std_ReturnType Mem_Read (Mem_InstanceIdType instanceId, Mem_AddressType sourceAddress, Mem_DataType* destinationDataPtr, Mem_LengthType length);Triggers a read job to copy the from the source address into the referenced destination data buffer.Std_ReturnType Mem_Write (Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, const Mem_DataType* sourceDataPtr, Mem_LengthType length);Triggers a write job to store the passed data to the provided address area with given address and length.Std_ReturnType Mem_Erase (Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, Mem_LengthType length);Triggers an erase job of the given sector/sector batch defined by targetAddress and length.void Mem_PropagateError (Mem_InstanceIdType instanceId);This service can be used to report an access error in case the Mem driver cannot provide the access error information -...Std_ReturnType Mem_BlankCheck (Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, Mem_LengthType length);Triggers a job to check the erased state of the page which is referenced by targetAddress.Std_ReturnType Mem_HwSpecificService (Mem_InstanceIdType instanceId, Mem_HwServiceIdType hwServiceId, Mem_DataType* dataPtr, Mem_LengthType* lengthPtr);Triggers a hardware specific memory driver job.void Mem_DeInit (void);De-initialize module.void Mem_Suspend (Mem_InstanceIdType instanceId);Suspend active memory operation using hardware mechanism.void Mem_Resume (Mem_InstanceIdType instanceId);Resume suspended memory operation using hardware mechanism.
Typen — Übersicht
struct Mem_ConfigTypePostbuild configuration structure typestruct Mem_AddressTypePhysical memory device address typestruct Mem_DataTypeRead data user buffer typestruct Mem_InstanceIdTypeJob end notification function called by Mem in case the job processing is configured for job end notification.struct Mem_LengthTypePhysical memory device length typeenum Mem_JobResultTypeAsynchronous job result typestruct Mem_HwServiceIdTypeHardware specific service request identifier type
Anforderungen — Übersicht
SWS_Mem_00001The service Mem_Init shall initialize the Mem driver internal states and set the Mem driver job processing state to MEM_JOB_OK.SWS_Mem_00002If development error detection is enabled by MemDevEr- rorDetect , the service Mem_GetVersionInfo shall raise the development...SWS_Mem_00003If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall check that the Mem driver has...SWS_Mem_00004If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall check that the provided...SWS_Mem_00005If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error...SWS_Mem_00006If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error...SWS_Mem_00007If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall raise the development error...SWS_Mem_00008If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Write shall check that the Mem driver has...SWS_Mem_00009If development error detection is enabled by MemDevEr- rorDetect , the service Mem_Write shall check that the provided...SWS_Mem_00010If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error...SWS_Mem_00011If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error...SWS_Mem_00012If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error...SWS_Mem_00013If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Write shall raise the development error...SWS_Mem_00014If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Erase shall check that the Mem driver has...SWS_Mem_00015If development error detection is enabled by MemDevEr- rorDetect , the service Mem_Erase shall check that the provided...SWS_Mem_00016If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Erase shall raise the development error...SWS_Mem_00017If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Erase shall raise the development error...SWS_Mem_00018If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Erase shall raise the development error...SWS_Mem_00019If development error detection is enabled by MemDevErrorDe- tect , the service Mem_PropagateError shall check that the Mem...SWS_Mem_00020If development error detection is enabled by MemDevErrorDe- tect , the service Mem_PropagateError shall check that the...SWS_Mem_00021If development error detection is enabled by MemDevErrorDe- tect , the service Mem_BlankCheck shall check that the Mem driver...SWS_Mem_00022If development error detection is enabled by MemDevErrorDe- tect , the service Mem_BlankCheck shall check that the provided...SWS_Mem_00023If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development...SWS_Mem_00024If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development...SWS_Mem_00025If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development...SWS_Mem_00026If development error detection is enabled by MemDevErrorDe- tect , the service Mem_HwSpecificService shall check that the...SWS_Mem_00027If development error detection is enabled by MemDevEr- rorDetect , the service Mem_HwSpecificService shall raise the...SWS_Mem_00029The Mem driver shall keep track of the job processing and the result of the last processed job.SWS_Mem_00030Once a job request is accepted, the job processing status shall be set to MEM_JOB_PENDING.SWS_Mem_00031In case a pending job was not able to complete, the job processing status shall be set to MEM_JOB_FAILED.SWS_Mem_00033The Mem driver shall check static configuration parameters statically (at the latest during compile time) for correctness.SWS_Mem_00035The Mem driver shall not perform any sort of address or length alignment in case physical segmentation needs to be considered, e.SWS_Mem_00036The Mem driver shall inherit the size of Mem_AddressType from MemAcc_AddressType to support memories larger than 4GBytes.SWS_Mem_00037If the maximum physical memory size of a device does not ex- ceed 4GBytes, the Mem driver shall perform an explicit cast and...SWS_Mem_00038The Mem driver shall provide two ways for the service function invocation: • Direct service invocation • Indirect service...SWS_Mem_00039If built as a separate image, the Mem driver shall be completely self contained, i.SWS_Mem_00040Since Mem drivers are always hardware/CPU specific, the byte order of data fields and address information within the Mem...SWS_Mem_00041The header part of the Mem driver binary shall follow the struc- ture defined in table 7.SWS_Mem_00042The unique identifier is used for unique identification of Mem drivers.SWS_Mem_00043The ABI version of a Mem driver following this specification shall be 0001.SWS_Mem_00044The header address is used for development error checks to verify the consistency of the linked Mem driver binary image with...SWS_Mem_00045The flag part of the Mem driver header is a bit-field which holds additional information for develop error checks.SWS_Mem_00046The delimiter address part of the Mem driver header is used for development error checks to verify that the Mem driver binary...SWS_Mem_00048The size of the Mem driver function pointers shall be ma- chine/CPU specific.SWS_Mem_00051The value of the delimiter field shall be the ones' complement of the unique identifier value.SWS_Mem_00052Development Error Types The development error types defined for Mem are listed in table Table 7.SWS_Mem_00053All hardware specific routines shall be accessed by the Mem_HwSpecificService() service.SWS_Mem_00057A Mem driver instance shall allow only one job request at a time.SWS_Mem_00059If the Mem driver is not able to process a job request, e.SWS_Mem_00060The Mem driver implementation shall support multiple instances of the same memory device.SWS_Mem_00061If the Mem_PropagateError service is called, the Mem driver shall set the job result code to MEM_ECC_UNCORRECTED and cancel...SWS_Mem_00062⌊ DRAFT g If the memory hardware provides ECC information, the Mem driver shall check for correctable ECC errors and set the...SWS_Mem_00063If the memory hardware provides ECC information, the Mem driver shall check for uncorrectable ECC errors and set the job...SWS_Mem_00065{DRAFT} The Mem driver does not use transient faults.SWS_Mem_00066All job requests triggered by asynchronous Mem driver services shall be executed within the Mem_MainFunction.SWS_Mem_00067After a job was successfully processed, the job processing status shall be set to MEM_JOB_OK.SWS_Mem_00068If development error detection is enabled by MemDevErrorDe- tect , the service Mem_HwSpecificService shall check that the Mem...SWS_Mem_00070In case a service is not relevant for a specific memory device technology, the service shall always return...SWS_Mem_00072If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error...SWS_Mem_00073The function pointer table is a standardized structure used to reference the Mem driver service functions.SWS_Mem_00074The Mem driver API names, type definitions and file naming scheme shall follow the standard AUTOSAR BSW Module implementation...SWS_Mem_00076In case the job processing was completed but the results of the last Mem job didn't meet the expected result, e.SWS_Mem_00077If the memory hardware supplies ECC information, the Mem driver shall check for correctable ECC errors and, in the case of...SWS_Mem_00078In case the last memory operation didn't complete due to an un- correctable ECC error, the job result shall be set to...SWS_Mem_00079The service Mem_DeInit shall cancel any ongoing flash oper- ations in the hardware and de-initialize the Mem driver internal...SWS_Mem_00080The service Mem_Suspend shall suspend any ongoing flash operations using an according hardware mechanism.SWS_Mem_00081The service Mem_Resume shall resume a flash operations that was suspended by the service Mem_Suspend.SWS_Mem_00082In case a memory device provides a hardware-based sus- pend/resume mechanism, the Mem driver shall utilize the hardware...SWS_Mem_00083In case a suspend operation is already in pending, Mem_- Suspend shall reject the request by returning E_NOT_OK without...SWS_Mem_00084In case no suspend operation is pending, Mem_Resume shall reject the request by returning E_NOT_OK without further actions.SWS_Mem_00085If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Suspend shall check that the Mem driver has...SWS_Mem_00086If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Resume shall check that the Mem driver has...SWS_Mem_00087If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Init shall raise the development error...SWS_Mem_00088The Mem driver shall not verify the result of a write or erase operation.SWS_Mem_00090If development error detection is enabled by MemDevErrorDe- tect , the service Mem_GetJobResult shall check that the provided...SWS_Mem_00091If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Suspend shall check that the provided...SWS_Mem_00092If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Resume shall check that the provided...SWS_Mem_10020Module Header File Imported Type MemAcc MemAcc_GeneralTypes.SWS_Mem_10021Det_ReportError Det.SWS_Mem_10022There are no mandatory interfaces.
Funktionen & Typen — Detailansicht
function Mem_Init [SWS_Mem_10008] 📄 PDF
void Mem_Init(const Mem_ConfigType* configPtr);
Initialization function - initializes all variables and sets the module state to initialized.
function Mem_GetVersionInfo [SWS_Mem_10009] 📄 PDF
void Mem_GetVersionInfo(Std_VersionInfoType* versionInfoPtr);
Service to return the version information of the Mem module.
function Mem_MainFunction [SWS_Mem_10010] 📄 PDF
void Mem_MainFunction(void);
Service to handle the requested jobs and the internal management operations.
function Mem_GetJobResult [SWS_Mem_10011] 📄 PDF
Mem_JobResultType Mem_GetJobResult(Mem_InstanceIdType instanceId);
Service to return results of the most recent job.
function Mem_Read [SWS_Mem_10012] 📄 PDF
Std_ReturnType Mem_Read(Mem_InstanceIdType instanceId, Mem_AddressType sourceAddress, Mem_DataType* destinationDataPtr, Mem_LengthType length);
Triggers a read job to copy the from the source address into the referenced destination data buffer. The result of this service can be retrieved using the Mem_GetJobResult API. If the read operation was successful, the result of the job is MEM_JOB_OK. If the read operation failed, the result of the job is either MEM_JOB_FAILED in case of a general error or MEM_ECC_ CORRECTED/MEM_ECC_UNCORRECTED in case of a correctable/uncorrectable ECC error.
function Mem_Write [SWS_Mem_10013] 📄 PDF
Std_ReturnType Mem_Write(Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, const Mem_DataType* sourceDataPtr, Mem_LengthType length);
Triggers a write job to store the passed data to the provided address area with given address and length. The result of this service can be retrieved using the Mem_GetJobResult API. If the write operation was successful, the job result is MEM_JOB_OK. If there was an issue writing the data, the result is MEM_FAILED.
function Mem_Erase [SWS_Mem_10014] 📄 PDF
Std_ReturnType Mem_Erase(Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, Mem_LengthType length);
Triggers an erase job of the given sector/sector batch defined by targetAddress and length. The result of this service can be retrieved using the Mem_GetJobResult API. If the erase operation was successful, the result of the job is MEM_JOB_OK. If the erase operation failed, e.g. due to a hardware issue, the result of the job is MEM_JOB_FAILED.
function Mem_PropagateError [SWS_Mem_10015] 📄 PDF
void Mem_PropagateError(Mem_InstanceIdType instanceId);
This service can be used to report an access error in case the Mem driver cannot provide the access error information - typically for ECC faults. It is called by the system ECC handler to propagate an ECC error to the memory upper layers..
function Mem_BlankCheck [SWS_Mem_10016] 📄 PDF
Std_ReturnType Mem_BlankCheck(Mem_InstanceIdType instanceId, Mem_AddressType targetAddress, Mem_LengthType length);
Triggers a job to check the erased state of the page which is referenced by targetAddress. The result of this service can be retrieved using the Mem_GetJobResult API. If the checked page is blank, the result of the job is MEM_JOB_OK. Otherwise, if the page is not blank, the result is MEM_INCONSISTENT.
function Mem_HwSpecificService [SWS_Mem_10017] 📄 PDF
Std_ReturnType Mem_HwSpecificService(Mem_InstanceIdType instanceId, Mem_HwServiceIdType hwServiceId, Mem_DataType* dataPtr, Mem_LengthType* lengthPtr);
Triggers a hardware specific memory driver job. dataPtr can be used to pass and return data to/ from this service. This service is just a dispatcher to the hardware specific service implementation referenced by hwServiceId. The result of this service can be retrieved using the Mem_GetJobResult API. If the hardware specific operation was successful, the result of the job is MEM_JOB_OK. If the hardware specific operation failed, the result of the job is MEM_JOB_ FAILED. Tags: atp.Status=draft
function Mem_DeInit [SWS_Mem_10018] 📄 PDF
void Mem_DeInit(void);
De-initialize module. If there is still an access job pending, it is immediately terminated (using hardware cancel operation) and the Mem driver module state is set to unitialized. Therefore, Mem must be re-initialized before it will accept any new job requests after this service is processed.
function Mem_Suspend [SWS_Mem_10024] 📄 PDF
void Mem_Suspend(Mem_InstanceIdType instanceId);
Suspend active memory operation using hardware mechanism. Tags: atp.Status=draft
function Mem_Resume [SWS_Mem_10025] 📄 PDF
void Mem_Resume(Mem_InstanceIdType instanceId);
Resume suspended memory operation using hardware mechanism. Tags: atp.Status=draft
type Mem_ConfigType [SWS_Mem_10000] 📄 PDF
Postbuild configuration structure type
type Mem_AddressType [SWS_Mem_10002] 📄 PDF
Physical memory device address type
type Mem_DataType [SWS_Mem_10003] 📄 PDF
Read data user buffer type
type Mem_InstanceIdType [SWS_Mem_10004] 📄 PDF
Job end notification function called by Mem in case the job processing is configured for job end notification.
type Mem_LengthType [SWS_Mem_10007] 📄 PDF
Physical memory device length type
type Mem_JobResultType [SWS_Mem_10019] 📄 PDF
Asynchronous job result type
type Mem_HwServiceIdType [SWS_Mem_10026] 📄 PDF
Hardware specific service request identifier type
requirement SWS_Mem_00001 [SWS_Mem_00001] 📄 PDF
The service Mem_Init shall initialize the Mem driver internal states and set the Mem driver job processing state to MEM_JOB_OK .
requirement SWS_Mem_00002 [SWS_Mem_00002] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_GetVersionInfo shall raise the development er- ror MEM_E_PARAM_POINTER if the versionInfoPtr argument is a NULL pointer.
requirement SWS_Mem_00003 [SWS_Mem_00003] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall check that the Mem driver has been initialized. If this check fails, Mem_Read shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00004 [SWS_Mem_00004] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_Read shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00005 [SWS_Mem_00005] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error MEM_E_PARAM_POINTER if the destinationDataPtr argument is a NULL pointer.
requirement SWS_Mem_00006 [SWS_Mem_00006] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error MEM_E_PARAM_ADDRESS if the address defined by sourceAddress is invalid.
requirement SWS_Mem_00007 [SWS_Mem_00007] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Read shall raise the development error MEM_E_JOB_PENDING if a previous Mem job is still being processed.
requirement SWS_Mem_00008 [SWS_Mem_00008] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Write shall check that the Mem driver has been initialized. If this check fails, Mem_Write shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00009 [SWS_Mem_00009] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_Write shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_Write shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00010 [SWS_Mem_00010] 📄 PDF
If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error MEM_E_PARAM_POINTER if the sourceDataPtr argument is a NULL pointer.
requirement SWS_Mem_00011 [SWS_Mem_00011] 📄 PDF
If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error MEM_E_PARAM_ADDRESS if the address defined by targetAddress is invalid.
requirement SWS_Mem_00012 [SWS_Mem_00012] 📄 PDF
If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Write shall raise the development error MEM_E_PARAM_LENGTH if the write length defined by length is invalid.
requirement SWS_Mem_00013 [SWS_Mem_00013] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Write shall raise the development error MEM_E_JOB_PENDING if a previous Mem job is still being processed.
requirement SWS_Mem_00014 [SWS_Mem_00014] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Erase shall check that the Mem driver has been initialized. If this check fails, Mem_Erase shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00015 [SWS_Mem_00015] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_Erase shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_Erase shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00016 [SWS_Mem_00016] 📄 PDF
If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Erase shall raise the development error MEM_E_PARAM_ADDRESS if the address defined by targetAddress is invalid.
requirement SWS_Mem_00017 [SWS_Mem_00017] 📄 PDF
If development error detection is enabled by MemDev- ErrorDetect , the service Mem_Erase shall raise the development error MEM_E_PARAM_LENGTH if the read length defined by length is invalid.
requirement SWS_Mem_00018 [SWS_Mem_00018] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Erase shall raise the development error MEM_E_JOB_PENDING if a previous Mem job is still being processed.
requirement SWS_Mem_00019 [SWS_Mem_00019] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_PropagateError shall check that the Mem driver has been initialized. If this check fails, Mem_PropagateError shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00020 [SWS_Mem_00020] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_PropagateError shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_PropagateError shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00021 [SWS_Mem_00021] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_BlankCheck shall check that the Mem driver has been initialized. If this check fails, Mem_BlankCheck shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00022 [SWS_Mem_00022] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_BlankCheck shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_BlankCheck shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00023 [SWS_Mem_00023] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development error MEM_E_PARAM_ADDRESS if the address defined by targetAddress is invalid.
requirement SWS_Mem_00024 [SWS_Mem_00024] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development error MEM_E_PARAM_LENGTH if the read length defined by length is invalid.
requirement SWS_Mem_00025 [SWS_Mem_00025] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_BlankCheck shall raise the development error MEM_E_JOB_PENDING if a previous Mem job is still being processed.
requirement SWS_Mem_00026 [SWS_Mem_00026] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_HwSpecificService shall check that the provided instan- ceId is consistent with the configuration. If this check fails, Mem_HwSpecificSer- vice shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00027 [SWS_Mem_00027] 📄 PDF
If development error detection is enabled by MemDevEr- rorDetect , the service Mem_HwSpecificService shall raise the development error MEM_E_PARAM_POINTER if the dataPtr or lengthPtr argument is a NULL pointer.
requirement SWS_Mem_00029 [SWS_Mem_00029] 📄 PDF
The Mem driver shall keep track of the job processing and the result of the last processed job.
requirement SWS_Mem_00030 [SWS_Mem_00030] 📄 PDF
Once a job request is accepted, the job processing status shall be set to MEM_JOB_PENDING .
requirement SWS_Mem_00031 [SWS_Mem_00031] 📄 PDF
In case a pending job was not able to complete, the job processing status shall be set to MEM_JOB_FAILED .
requirement SWS_Mem_00033 [SWS_Mem_00033] 📄 PDF
The Mem driver shall check static configuration parameters statically (at the latest during compile time) for correctness.
requirement SWS_Mem_00035 [SWS_Mem_00035] 📄 PDF
The Mem driver shall not perform any sort of address or length alignment in case physical segmentation needs to be considered, e.g. for flash mem- ory.
requirement SWS_Mem_00036 [SWS_Mem_00036] 📄 PDF
The Mem driver shall inherit the size of Mem_AddressType from MemAcc_AddressType to support memories larger than 4GBytes.
requirement SWS_Mem_00037 [SWS_Mem_00037] 📄 PDF
If the maximum physical memory size of a device does not ex- ceed 4GBytes, the Mem driver shall perform an explicit cast and work internally with a 32-Bit address type.
requirement SWS_Mem_00038 [SWS_Mem_00038] 📄 PDF
The Mem driver shall provide two ways for the service function invocation: • Direct service invocation • Indirect service invocation by a function pointer table
requirement SWS_Mem_00039 [SWS_Mem_00039] 📄 PDF
If built as a separate image, the Mem driver shall be completely self contained, i.e. it must not call any library or any other external functions.
requirement SWS_Mem_00040 [SWS_Mem_00040] 📄 PDF
Since Mem drivers are always hardware/CPU specific, the byte order of data fields and address information within the Mem driver binary shall follow the standard CPU byte order.
requirement SWS_Mem_00041 [SWS_Mem_00041] 📄 PDF
The header part of the Mem driver binary shall follow the struc- ture defined in table 7.1. The size of the address information depends on the configured MemAcc_AddressType (4 or 8 bytes).
requirement SWS_Mem_00042 [SWS_Mem_00042] 📄 PDF
The unique identifier is used for unique identification of Mem drivers. The format of the unique identifier shall follow the structure defined in table 7.2.
requirement SWS_Mem_00043 [SWS_Mem_00043] 📄 PDF
The ABI version of a Mem driver following this specification shall be 0001.
requirement SWS_Mem_00044 [SWS_Mem_00044] 📄 PDF
The header address is used for development error checks to verify the consistency of the linked Mem driver binary image with the location of the RAM buffer which is used for execution of the Mem driver. In case of a relocatable/position independent Mem driver binary, the header address shall be set to zero, otherwise, the header address shall hold the physical start address of the Mem driver binary.
requirement SWS_Mem_00045 [SWS_Mem_00045] 📄 PDF
The flag part of the Mem driver header is a bit-field which holds additional information for develop error checks. The format of the flag bit-field shall follow the structure defined in table 7.3.
requirement SWS_Mem_00046 [SWS_Mem_00046] 📄 PDF
The delimiter address part of the Mem driver header is used for development error checks to verify that the Mem driver binary is complete by checking the delimiter pattern linked to the end of the Mem driver binary. In case of a relocatable/position independent Mem driver binary, the delimiter address shall be set to zero, otherwise, the delimiter address shall hold the physical address of the delimiter pattern.
requirement SWS_Mem_00048 [SWS_Mem_00048] 📄 PDF
The size of the Mem driver function pointers shall be ma- chine/CPU specific.
requirement SWS_Mem_00051 [SWS_Mem_00051] 📄 PDF
The value of the delimiter field shall be the ones' complement of the unique identifier value.
requirement SWS_Mem_00052 [SWS_Mem_00052] 📄 PDF
Development Error Types The development error types defined for Mem are listed in table Table 7.5.
requirement SWS_Mem_00053 [SWS_Mem_00053] 📄 PDF
All hardware specific routines shall be accessed by the Mem_HwSpecificService() service.
requirement SWS_Mem_00057 [SWS_Mem_00057] 📄 PDF
A Mem driver instance shall allow only one job request at a time.
requirement SWS_Mem_00059 [SWS_Mem_00059] 📄 PDF
If the Mem driver is not able to process a job request, e.g. due to a pending request or due to an invalid parameter, the job request shall be rejected by an E_NOT_OK return code.
requirement SWS_Mem_00060 [SWS_Mem_00060] 📄 PDF
The Mem driver implementation shall support multiple instances of the same memory device.
requirement SWS_Mem_00061 [SWS_Mem_00061] 📄 PDF
If the Mem_PropagateError service is called, the Mem driver shall set the job result code to MEM_ECC_UNCORRECTED and cancel the current job processing.
requirement SWS_Mem_00062 [SWS_Mem_00062] 📄 PDF
⌊ DRAFT g If the memory hardware provides ECC information, the Mem driver shall check for correctable ECC errors and set the job result code to MEM_ECC_CORRECTED and proceed with the current job processing.
requirement SWS_Mem_00063 [SWS_Mem_00063] 📄 PDF
If the memory hardware provides ECC information, the Mem driver shall check for uncorrectable ECC errors and set the job result code to MEM_ECC_UNCORRECTED and abort the current job processing.
requirement SWS_Mem_00065 [SWS_Mem_00065] 📄 PDF
{DRAFT} The Mem driver does not use transient faults. In case the memory device supports extended error checks, the Mem driver shall indicate them to the upper layer using the normal fault handling.
requirement SWS_Mem_00066 [SWS_Mem_00066] 📄 PDF
All job requests triggered by asynchronous Mem driver services shall be executed within the Mem_MainFunction .
requirement SWS_Mem_00067 [SWS_Mem_00067] 📄 PDF
After a job was successfully processed, the job processing status shall be set to MEM_JOB_OK .
requirement SWS_Mem_00068 [SWS_Mem_00068] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_HwSpecificService shall check that the Mem driver has been initialized. If this check fails, Mem_HwSpecificService shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00070 [SWS_Mem_00070] 📄 PDF
In case a service is not relevant for a specific memory device technology, the service shall always return E_MEM_SERVICE_NOT_AVAIL .
requirement SWS_Mem_00072 [SWS_Mem_00072] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Read shall raise the development error MEM_E_PARAM_LENGTH if the read length defined by length is invalid.
requirement SWS_Mem_00073 [SWS_Mem_00073] 📄 PDF
The function pointer table is a standardized structure used to reference the Mem driver service functions. The format of function pointer table shall follow the structure defined in table 7.4.
requirement SWS_Mem_00074 [SWS_Mem_00074] 📄 PDF
The Mem driver API names, type definitions and file naming scheme shall follow the standard AUTOSAR BSW Module implementation prefix with vendorId and vendorApiInfix .
requirement SWS_Mem_00076 [SWS_Mem_00076] 📄 PDF
In case the job processing was completed but the results of the last Mem job didn't meet the expected result, e.g. a blank check operation was applied on a non-blank memory area, the job result shall be set to MEM_INCONSISTENT .
requirement SWS_Mem_00077 [SWS_Mem_00077] 📄 PDF
If the memory hardware supplies ECC information, the Mem driver shall check for correctable ECC errors and, in the case of correctable ECC errors, continue with the job processing. After completion of the job, the job result shall be set to MEM_ECC_CORRECTED .
requirement SWS_Mem_00078 [SWS_Mem_00078] 📄 PDF
In case the last memory operation didn't complete due to an un- correctable ECC error, the job result shall be set to MEM_ECC_UNCORRECTED .
requirement SWS_Mem_00079 [SWS_Mem_00079] 📄 PDF
The service Mem_DeInit shall cancel any ongoing flash oper- ations in the hardware and de-initialize the Mem driver internal states.
requirement SWS_Mem_00080 [SWS_Mem_00080] 📄 PDF
The service Mem_Suspend shall suspend any ongoing flash operations using an according hardware mechanism.
requirement SWS_Mem_00081 [SWS_Mem_00081] 📄 PDF
The service Mem_Resume shall resume a flash operations that was suspended by the service Mem_Suspend .
requirement SWS_Mem_00082 [SWS_Mem_00082] 📄 PDF
In case a memory device provides a hardware-based sus- pend/resume mechanism, the Mem driver shall utilize the hardware capabilities to implement the Mem_Suspend and Mem_Resume services. If no hardware suspend/re- sume support is available, the Mem_Suspend and Mem_Resume services shall return E_MEM_SERVICE_NOT_AVAIL .
requirement SWS_Mem_00083 [SWS_Mem_00083] 📄 PDF
In case a suspend operation is already in pending, Mem_- Suspend shall reject the request by returning E_NOT_OK without further actions.
requirement SWS_Mem_00084 [SWS_Mem_00084] 📄 PDF
In case no suspend operation is pending, Mem_Resume shall reject the request by returning E_NOT_OK without further actions.
requirement SWS_Mem_00085 [SWS_Mem_00085] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Suspend shall check that the Mem driver has been initialized. If this check fails, Mem_Suspend shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00086 [SWS_Mem_00086] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Resume shall check that the Mem driver has been initialized. If this check fails, Mem_Resume shall raise the development error MEM_E_UNINIT .
requirement SWS_Mem_00087 [SWS_Mem_00087] 📄 PDF
If development error detection is enabled by MemDe- vErrorDetect , the service Mem_Init shall raise the development error MEM_E_PARAM_POINTER if the configPtr argument is not a NULL pointer.
requirement SWS_Mem_00088 [SWS_Mem_00088] 📄 PDF
The Mem driver shall not verify the result of a write or erase operation.
requirement SWS_Mem_00090 [SWS_Mem_00090] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_GetJobResult shall check that the provided instanceId is consistent with the configuration. If this check fails, Mem_GetJobResult shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00091 [SWS_Mem_00091] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Suspend shall check that the provided instanceId is con- sistent with the configuration. If this check fails, Mem_Suspend shall raise the develop- ment error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_00092 [SWS_Mem_00092] 📄 PDF
If development error detection is enabled by MemDevErrorDe- tect , the service Mem_Resume shall check that the provided instanceId is consis- tent with the configuration. If this check fails, Mem_Resume shall raise the development error MEM_E_PARAM_INSTANCE_ID .
requirement SWS_Mem_10020 [SWS_Mem_10020] 📄 PDF
Module Header File Imported Type MemAcc MemAcc_GeneralTypes.h MemAcc_AddressType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType
requirement SWS_Mem_10021 [SWS_Mem_10021] 📄 PDF
Det_ReportError Det.h Service to report development errors.
requirement SWS_Mem_10022 [SWS_Mem_10022] 📄 PDF
There are no mandatory interfaces.
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Mem- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Mem@rel:R20-11#920f962d- Content hash
920f962d- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_MemoryDriver.pdf#nameddest=SWS_Mem_10008