Flash Driver (Fls)
AUTOSAR Classic Memory Drivers-Modul Flash Driver (Fls, Spezifikation: AUTOSAR_CP_SWS_FlashDriver.pdf, AUTOSAR_SWS_FlashDriver.pdf).
Funktionen — Übersicht
void Fls_Init (const Fls_ConfigType* ConfigPtr);Initializes the Flash Driver.Std_ReturnType Fls_Erase (Fls_AddressType TargetAddress, Fls_LengthType Length);Erases flash sector(s).Std_ReturnType Fls_Write (Fls_AddressType TargetAddress, const uint8* SourceAddressPtr, Fls_LengthType Length);Writes one or more complete flash pages.void Fls_Cancel (void);Cancels an ongoing job.MemIf_StatusType Fls_GetStatus (void);Returns the driver state.MemIf_JobResultType Fls_GetJobResult (void);Returns the result of the last job.void Fls_MainFunction (void);Performs the processing of jobs.Std_ReturnType Fls_Read (Fls_AddressType SourceAddress, uint8* TargetAddressPtr, Fls_LengthType Length);Reads from flash memory.Std_ReturnType Fls_Compare (Fls_AddressType SourceAddress, const uint8* TargetAddressPtr, Fls_LengthType Length);Compares the contents of an area of flash memory with that of an application data buffer.void Fls_SetMode (MemIf_ModeType Mode);Sets the flash driver's operation mode.void Fls_GetVersionInfo (Std_VersionInfoType* VersioninfoPtr);Returns the version information of this module.void Fee_JobEndNotification (void);This callback function is called when a job has been completed with a positive result.void Fee_JobErrorNotification (void);This callback function is called when a job has been canceled or finished with negative result.Std_ReturnType Fls_BlankCheck (Fls_AddressType TargetAddress, Fls_LengthType Length);The function Fls_BlankCheck shall verify, whether a given memory area has been erased but not (yet) programmed.
Typen — Übersicht
struct Fls_ConfigTypeA pointer to such a structure is provided to the flash driver initialization routine for configuration of the driver and flash...struct Fls_AddressTypeUsed as address offset from the configured flash base address to access a certain flash memory area.struct Fls_LengthTypeSpecifies the number of bytes to read/write/erase/compare.
Anforderungen — Übersicht
SWS_Fls_00001The FLS module shall offer asynchronous services for operations on flash memory (read/erase/write).SWS_Fls_00002The FLS module shall not buffer data.SWS_Fls_00003The FLS module shall not ensure data consistency of the given application buffer.SWS_Fls_00004Type of error Related error code Error value API service called with wrong parameter FLS_E_PARAM_CONFIG 0x01 API service...SWS_Fls_00014The function Fls_Init shall initialize the FLS module (software) and all flash memory relevant registers (hardware) with...SWS_Fls_00015If development error detection for the module Fls is enabled: the function Fls_Init shall check the (hardware specific)...SWS_Fls_00020If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the erase start address...SWS_Fls_00021If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the erase length is...SWS_Fls_00022If erase verification is enabled (compile switch FlsEraseVer- ificationEnabled set to TRUE): After a flash block has been...SWS_Fls_00023If runtime error detection for the module Fls is enabled: the func- tion Fls_Erase shall check that the FLS module is...SWS_Fls_00026If development error detection for the module Fls is enabled: the function Fls_Write shall check that the write start address...SWS_Fls_00027If development error detection for the module Fls is enabled: the function Fls_Write shall check that the write length is...SWS_Fls_00030If runtime error detection for the module Fls is enabled: the func- tion Fls_Write shall check that the FLS module is...SWS_Fls_00033The function Fls_Cancel shall set the job result to MEMIF_JOB_ CANCELED if the job result currently has the value...SWS_Fls_00034The function Fls_GetStatus shall return the FLS module state synchronously.SWS_Fls_00035The function Fls_GetJobResult shall return the result of the last job synchronouslySWS_Fls_00036The erase, write, read and compare functions shall share the same job result, i.SWS_Fls_00037The function Fls_MainFunction shall perform the processing of the flash read, write, erase and compare jobs.SWS_Fls_00038When a job has been initiated, the FLS module's environment shall call the function Fls_MainFunction cyclically until the job...SWS_Fls_00039The function Fls_MainFunction shall return without any action if no job is pending.SWS_Fls_00040The function Fls_MainFunction shall only process as much data in one call cycle as statically configured for the current job...SWS_Fls_00048If supported by hardware, the function Fls_Init shall set the flash memory erase/write protection as provided in the...SWS_Fls_00055If erase verification is enabled (compile switch FlsEraseVer- ificationEnabled set to TRUE): Before writing a flash block, the...SWS_Fls_00056If write verification is enabled (compile switch FlsWriteVerifi- cationEnabled set to TRUE): After writing a flash block, the...SWS_Fls_00065If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the FLS module has been...SWS_Fls_00066If development error detection for the module Fls is enabled: the function Fls_Write shall check that the FLS module has been...SWS_Fls_00086The function Fls_Init shall initialize all FLS module global vari- ables and those controller registers that are needed for...SWS_Fls_00088The functional requirements [2] and the functional scope are the same for both internal and external drivers.SWS_Fls_00097If development error detection for the module Fls is enabled: the function Fls_Read shall check that the read start address...SWS_Fls_00098If development error detection for the module Fls is enabled: the function Fls_Read shall check that the read length is...SWS_Fls_00099If development error detection for the module Fls is enabled: the function Fls_Read shall check that the driver has been...SWS_Fls_00100If runtime error detection for the module Fls is enabled: the func- tion Fls_Read shall check that the driver is currently not...SWS_Fls_00104The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_ERASE_FAILED to the...SWS_Fls_00105The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_WRITE_FAILED to the...SWS_Fls_00106The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_READ_FAILED to the...SWS_Fls_00110The callback notifications shall have no parameters and no return value.SWS_Fls_00137The FLS module's implementer shall place the code of the flash access routines into a separate C-module Fls_ac.SWS_Fls_00140The FLS module's erase routine shall load the flash access code for erasing the flash memory to the location in RAM pointed to...SWS_Fls_00141The FLS module's write routine shall load the flash access code for writing the flash memory to the location in RAM pointed to...SWS_Fls_00143After an erase or write job has been finished or canceled, the FLS module's main processing routine shall unload (i.SWS_Fls_00144During the initialization of the external flash driver, the FLS module shall check the hardware ID of the external flash...SWS_Fls_00145If possible, e.SWS_Fls_00146If possible, e.SWS_Fls_00147If configured, the function Fls_Cancel shall call the error notifi- cation function to inform the caller about the...SWS_Fls_00150If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the compare start...SWS_Fls_00151If If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the given length is...SWS_Fls_00152If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the driver has been...SWS_Fls_00153If runtime error detection for the module Fls is enabled: the func- tion Fls_Compare shall check that the driver is currently...SWS_Fls_00154The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_COMPARE_FAILED to...SWS_Fls_00155The function Fls_SetMode shall set the FLS module's operation mode to the given "Mode" parameter.SWS_Fls_00156If runtime error detection for the module Fls is enabled: the func- tion Fls_SetMode shall check that the FLS module is...SWS_Fls_00157If development error detection for the module Fls is enabled: the function Fls_Write shall check the given data buffer pointer...SWS_Fls_00158If development error detection for the module Fls is enabled: the function Fls_Read shall check the given data buffer pointer...SWS_Fls_00167The FLS module shall call the callback function Fee_JobEndNo- tification when the module has completed a job with a positive...SWS_Fls_00183The function Fls_Cancel shall be pre-compile time configurable On/Off by the configuration parameter FlsCancelApi.SWS_Fls_00184The function Fls_GetStatus shall be pre-compile time config- urable On/Off by the configuration parameter FlsGetStatusApi.SWS_Fls_00185The function Fls_GetJobResult shall be pre-compile time configurable On/Off by the configuration parameter FlsGetJobResultApi.SWS_Fls_00186The function Fls_Compare shall be pre-compile time config- urable On/Off by the configuration parameter FlsCompareApi.SWS_Fls_00187The function Fls_SetMode shall be pre-compile time config- urable On/Off by the configuration parameter FlsSetModeApi.SWS_Fls_00191The function Fls_Init shall store the pointer to the given config- uration set in a variable in order to allow the FLS module...SWS_Fls_00193Depending on implementation, callback routines provided and/or invoked by the FLS module may be called on interrupt level.SWS_Fls_00196The function Fls_MainFunction shall at the most issue one sector erase command (to the hardware) in each cycle.SWS_Fls_00200The function Fls_MainFunction shall set the job result to MEMIF_BLOCK_INCONSISTENT if the compared data from a flash compare...SWS_Fls_00205The FLS module shall check static configuration parameters stat- ically (at the latest during compile time) for correctness.SWS_Fls_00206The FLS module shall validate the version information in the FLS module header and source files for consistency (e.SWS_Fls_00208The FLS module shall combine all available flash memory areas into one linear address space (denoted by the parameters...SWS_Fls_00209The FLS module shall map the address and length parameters for the read, write, erase and compare functions as "virtual"...SWS_Fls_00211The FLS module's implementer shall keep the execution time for the flash access code as short as possible.SWS_Fls_00212The FLS module's main processing routine shall execute the flash access code routines.SWS_Fls_00213The FLS module's main processing routine shall access the flash access code routines by means of the respective function...SWS_Fls_00214The FLS module shall only load the access code to the RAM if the access code cannot be executed out of flash ROM.SWS_Fls_00215The FLS module's flash access routines shall only disable inter- rupts and wait for the completion of the erase / write...SWS_Fls_00216The type Fls_AddressType shall have 0 as lower limit for each flash device.SWS_Fls_00217The FLS module shall add a device specific base address to the address type Fls_AddressType if necessary.SWS_Fls_00218The job of the function Fls_Erase shall erase one or more com- plete flash sectors.SWS_Fls_00220The FLS module shall execute the job of the function Fls_Erase asynchronously within the FLS module's main function.SWS_Fls_00221The job of the function Fls_Erase shall erase a flash memory block starting from the flash memory base address + TargetAddress...SWS_Fls_00223The job of the function Fls_Write shall write one or more com- plete flash pages to the flash device.SWS_Fls_00225The FLS module shall execute the write job of the function Fls_- Write asynchronously within the FLS module's main function.SWS_Fls_00226The job of the function Fls_Write shall program a flash memory block with data provided via SourceAddressPtr starting from the...SWS_Fls_00229The function Fls_Cancel shall cancel an ongoing flash read, write, erase or compare job.SWS_Fls_00230The function Fls_Cancel shall abort a running job synchronously so that directly after returning from this function a new job...SWS_Fls_00232The configuration parameter FlsUseInterrupts shall switch between interrupt and polling controlled job processing if this is...SWS_Fls_00233The FLS module's implementer shall locate the interrupt service routine in Fls_Irq.SWS_Fls_00234If interrupt controlled job processing is supported and enabled with the configuration parameter FlsUseInterrupts, the...SWS_Fls_00235The function Fls_MainFunction shall process jobs without hardware interrupt support (e.SWS_Fls_00236The function Fls_Read shall read from flash memory.SWS_Fls_00238The FLS module shall execute the read job of the function Fls_Read asynchronously within the FLS module's main function.SWS_Fls_00239The read job of the function Fls_Read shall copy a continuous flash memory block starting from the flash memory base address +...SWS_Fls_00240The FLS module's environment shall only call the function Fls_- Read after the FLS module has been initialized.SWS_Fls_00241The function Fls_Compare shall compare the contents of an area of flash memory with that of an application data buffer.SWS_Fls_00243The FLS module shall execute the job of the function Fls_- Compare asynchronously within the FLS module's main function.SWS_Fls_00244The job of the function Fls_Compare shall compare a continuous flash memory block starting from the flash memory base address...SWS_Fls_00248Module Header File Imported Type MemIf.SWS_Fls_00260Det_ReportRuntimeError Det.SWS_Fls_00261Det_ReportError Det.SWS_Fls_00268If runtime error detection for the module Fls is enabled: the func- tion Fls_Init shall check module initialization status.SWS_Fls_00269The Fls module shall provide only one scheduled function.SWS_Fls_00272If timeout supervision is enabled (compile switch FlsTimeoutSu- pervisionEnabled set to TRUE): the function Fls_MainFunction...SWS_Fls_00273If development error detection for the module Fls is enabled: the function Fls_Compare shall check the given data buffer...SWS_Fls_00310The following development error codes shall be reported when an API service is called with a wrong parameter:...SWS_Fls_00312The runtime error code FLS_E_BUSY shall be reported when an API service is called while the module is still busy.SWS_Fls_00313The runtime error code FLS_E_VERIFY_ERASE_FAILED shall be reported when the erase verification function is enabled (by the...SWS_Fls_00314The runtime error code FLS_E_VERIFY_WRITE_FAILED shall be reported when the write verification function is enabled (by the...SWS_Fls_00315The transient fault code FLS_E_ERASE_FAILED shall be reported when the flash erase function failed (in hardware).SWS_Fls_00316The transient fault code FLS_E_WRITE_FAILED shall be reported when the flash write function failed (in hardware).SWS_Fls_00317The transient fault code FLS_E_READ_FAILED shall be reported when the flash read function failed (in hardware).SWS_Fls_00318The transient fault code FLS_E_COMPARE_FAILED shall be re- ported when the flash compare function failed (in hardware).SWS_Fls_00319The transient fault code FLS_E_UNEXPECTED_FLASH_ID shall be reported when the expected flash ID is not matched (see...SWS_Fls_00323The function Fls_Init shall set the FLS module state to MEMIF_ IDLE after having finished the FLS module initialization.SWS_Fls_00324The function Fls_Init shall set the flash job result to MEMIF_ JOB_OK after having finished the FLS module initialization.SWS_Fls_00327The function Fls_Erase shall copy the given parameters to FLS module internal variables and initiate an erase job.SWS_Fls_00328After initiating the erase job, the function Fls_Erase shall set the FLS module status to MEMIF_BUSY.SWS_Fls_00329After initiating the erase job, the function Fls_Erase shall set the job result to MEMIF_JOB_PENDING.SWS_Fls_00330After initiating the erase job, the function Fls_Erase shall return with E_OK.SWS_Fls_00331The function Fls_Write shall copy the given parameters to Fls module internal variables and initiate a write job.SWS_Fls_00332After initiating the write job, the function Fls_Write shall set the FLS module status to MEMIF_BUSY.SWS_Fls_00333After initiating the write job, the function Fls_Write shall set the job result to MEMIF_JOB_PENDING.SWS_Fls_00334After initiating the write job, the function Fls_Write shall return with E_OK.SWS_Fls_00335The function Fls_Cancel shall reset the FLS module's internal job processing variables (like address, length and data pointer).SWS_Fls_00336The function Fls_Cancel shall set the FLS module state to MEMIF_IDLE.SWS_Fls_00337The function Fls_Read shall copy the given parameters to FLS module internal variables and initiate a read job.SWS_Fls_00338After initiating a read job, the function Fls_Read shall set the FLS module status to MEMIF_BUSY.SWS_Fls_00339After initiating a read job, the function Fls_Read shall set the FLS module job result to MEMIF_JOB_PENDING.SWS_Fls_00340After initiating a read job, the function Fls_Read shall return with E_OK.SWS_Fls_00341The function Fls_Compare shall copy the given parameters to Fls module internal variables and initiate a compare job.SWS_Fls_00342After initiating the compare job, the function Fls_Compare shall set the status to MEMIF_BUSY.SWS_Fls_00343After initiating the compare job, the function Fls_Compare shall set the job result to MEMIF_JOB_PENDING.SWS_Fls_00344After initiating the compare job, the function Fls_Compare shall return with E_OK.SWS_Fls_00345After a read, erase, write or compare job has been finished, the function Fls_MainFunction shall set the FLS module's job...SWS_Fls_00346After a read, erase, write or compare job has been finished, the function Fls_MainFunction shall set the FLS module's state to...SWS_Fls_00347The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has finished a job with a negative...SWS_Fls_00348The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has canceled an ongoing job: • Read...SWS_Fls_00349The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has finished a compare job and the...SWS_Fls_00352The table above specifies the parameters that shall be located in an external data structure of type Fls_ConfigType.SWS_Fls_00353The organization and location of the data structure Fls_Config- Type shall be up to the implementer.SWS_Fls_00355Hardware or implementation specific parameters can be added to Fls_ConfigType if necessary.SWS_Fls_00356If development error detection for the module Fls is enabled: the function Fls_Cancel shall check that the FLS module has been...SWS_Fls_00358If development error detection for the module Fls is enabled: the function Fls_GetJobResult shall check that the FLS module...SWS_Fls_00359If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction...SWS_Fls_00360If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction...SWS_Fls_00361The runtime error code FLS_E_TIMEOUT shall be reported when the timeout supervision function is enabled (by the compile switch...SWS_Fls_00362If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction...SWS_Fls_00363If development error detection for the module Fls is enabled: the function Fls_GetVersionInfo shall raise the development...SWS_Fls_00373The function Fls_BlankCheck shall verify, whether a given mem- ory area has been erased but not (yet) re-programmed.SWS_Fls_00374The function Fls_BlankCheck shall copy the given parameters to FLS module internal variables and initiate the verification job.SWS_Fls_00375After initiating the verification job, the function Fls_BlankCheck shall set the FLS module status to MEMIF_BUSY.SWS_Fls_00376After initiating the verification job, the function Fls_BlankCheck shall set the FLS module job result to MEMIF_JOB_PENDING.SWS_Fls_00377After initiating the verification job, the function Fls_BlankCheck shall return with E_OK.SWS_Fls_00378The FLS module shall execute the verification job of the function Fls_BlankCheck asynchronously within the FLS module's main...SWS_Fls_00379The verification job of the function Fls_BlankCheck shall check, that the continuous flash memory area starting from the flash...SWS_Fls_00380If development error detection for the module FLS is enabled; the function Fls_BlankCheck shall check that the verification...SWS_Fls_00381If development error detection for the module FLS is enabled: the function Fls_BlankCheck shall check that the given length is...SWS_Fls_00382If development error detection for the module FLS is enabled: the function Fls_BlankCheck shall check that the driver has been...SWS_Fls_00383If runtime error detection for the module FLS is enabled: the func- tion Fls_BlankCheck shall check that the driver is...SWS_Fls_00385If the underlying flash technology requires a certain alignment of the read address or length information and if the address...SWS_Fls_00389The FLS module shall handle data buffer alignment internally.SWS_Fls_00390If more than one instance of the flash driver is used in an ECU, the individual instances have to be given a unique instance ID.SWS_Fls_91001Type of error Related error code Error value API service called while driver still busy FLS_E_BUSY 0x06 Erase verification...SWS_Fls_91002Type of error Related error code Error value Flash erase failed (HW) FLS_E_ERASE_FAILED 0x01 Flash write failed (HW)...SWS_Fls_NA_00366These requirements are not applicable to this specifica- tion.
Funktionen & Typen — Detailansicht
함수 Fls_Init [SWS_Fls_00249] 📄 PDF
void Fls_Init(const Fls_ConfigType* ConfigPtr);
Initializes the Flash Driver.
함수 Fls_Erase [SWS_Fls_00250] 📄 PDF
Std_ReturnType Fls_Erase(Fls_AddressType TargetAddress, Fls_LengthType Length);
Erases flash sector(s).
함수 Fls_Write [SWS_Fls_00251] 📄 PDF
Std_ReturnType Fls_Write(Fls_AddressType TargetAddress, const uint8* SourceAddressPtr, Fls_LengthType Length);
Writes one or more complete flash pages.
함수 Fls_Cancel [SWS_Fls_00252] 📄 PDF
void Fls_Cancel(void);
Cancels an ongoing job.
함수 Fls_GetStatus [SWS_Fls_00253] 📄 PDF
MemIf_StatusType Fls_GetStatus(void);
Returns the driver state.
함수 Fls_GetJobResult [SWS_Fls_00254] 📄 PDF
MemIf_JobResultType Fls_GetJobResult(void);
Returns the result of the last job.
함수 Fls_MainFunction [SWS_Fls_00255] 📄 PDF
void Fls_MainFunction(void);
Performs the processing of jobs.
함수 Fls_Read [SWS_Fls_00256] 📄 PDF
Std_ReturnType Fls_Read(Fls_AddressType SourceAddress, uint8* TargetAddressPtr, Fls_LengthType Length);
Reads from flash memory.
함수 Fls_Compare [SWS_Fls_00257] 📄 PDF
Std_ReturnType Fls_Compare(Fls_AddressType SourceAddress, const uint8* TargetAddressPtr, Fls_LengthType Length);
Compares the contents of an area of flash memory with that of an application data buffer.
함수 Fls_SetMode [SWS_Fls_00258] 📄 PDF
void Fls_SetMode(MemIf_ModeType Mode);
Sets the flash driver's operation mode.
함수 Fls_GetVersionInfo [SWS_Fls_00259] 📄 PDF
void Fls_GetVersionInfo(Std_VersionInfoType* VersioninfoPtr);
Returns the version information of this module.
함수 Fee_JobEndNotification [SWS_Fls_00262] 📄 PDF
void Fee_JobEndNotification(void);
This callback function is called when a job has been completed with a positive result.
함수 Fee_JobErrorNotification [SWS_Fls_00263] 📄 PDF
void Fee_JobErrorNotification(void);
This callback function is called when a job has been canceled or finished with negative result.
함수 Fls_BlankCheck [SWS_Fls_00371] 📄 PDF
Std_ReturnType Fls_BlankCheck(Fls_AddressType TargetAddress, Fls_LengthType Length);
The function Fls_BlankCheck shall verify, whether a given memory area has been erased but not (yet) programmed. The function shall limit the maximum number of checked flash cells per main function cycle to the configured value FlsMaxReadNormalMode or FlsMaxReadFastMode respectively.
타입 Fls_ConfigType [SWS_Fls_00368] 📄 PDF
A pointer to such a structure is provided to the flash driver initialization routine for configuration of the driver and flash memory hardware.
타입 Fls_AddressType [SWS_Fls_00369] 📄 PDF
Used as address offset from the configured flash base address to access a certain flash memory area.
타입 Fls_LengthType [SWS_Fls_00370] 📄 PDF
Specifies the number of bytes to read/write/erase/compare.
requirement SWS_Fls_00001 [SWS_Fls_00001] 📄 PDF
The FLS module shall offer asynchronous services for operations on flash memory (read/erase/write).
requirement SWS_Fls_00002 [SWS_Fls_00002] 📄 PDF
The FLS module shall not buffer data. The FLS module shall use application data buffers that are referenced by a pointer passed via the API.
requirement SWS_Fls_00003 [SWS_Fls_00003] 📄 PDF
The FLS module shall not ensure data consistency of the given application buffer.
requirement SWS_Fls_00004 [SWS_Fls_00004] 📄 PDF
Type of error Related error code Error value API service called with wrong parameter FLS_E_PARAM_CONFIG 0x01 API service called with wrong parameter FLS_E_PARAM_ADDRESS 0x02 API service called with wrong parameter FLS_E_PARAM_LENGTH 0x03 API service called with wrong parameter FLS_E_PARAM_DATA 0x04 API service called without module initialization FLS_E_UNINIT 0x05 API service called with NULL pointer FLS_E_PARAM_POINTER 0x0a – FLS_E_ALREADY_INITIALIZED 0x0b
requirement SWS_Fls_00014 [SWS_Fls_00014] 📄 PDF
The function Fls_Init shall initialize the FLS module (software) and all flash memory relevant registers (hardware) with parameters provided in the given configuration set.
requirement SWS_Fls_00015 [SWS_Fls_00015] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Init shall check the (hardware specific) contents of the given configu- ration set for being within the allowed range. If this is not the case, it shall raise the development error FLS_E_PARAM_CONFIG .
requirement SWS_Fls_00020 [SWS_Fls_00020] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the erase start address (flash memory base ad- dress + TargetAddress ) is aligned to a flash sector boundary and that it lies within the specified lower and upper flash address boundaries. If this check fails, the func- tion Fls_Erase shall reject the erase request, raise the development error FLS_E_- PARAM_ADDRESS and return with E_NOT_OK.
requirement SWS_Fls_00021 [SWS_Fls_00021] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the erase length is greater than 0 and that the erase end address (erase start address + length) is aligned to a flash sector boundary and that it lies within the specified upper flash address boundary. If this check fails, the function Fls_Erase shall reject the erase request, raise the development error FLS_E_PARAM_LENGTH and return with E_NOT_OK.
requirement SWS_Fls_00022 [SWS_Fls_00022] 📄 PDF
If erase verification is enabled (compile switch FlsEraseVer- ificationEnabled set to TRUE): After a flash block has been erased, the func- tion Fls_MainFunction shall compare the contents of the addressed memory area against the value of an erased flash cell to check that the block has been completely erased. If this check fails, the function Fls_MainFunction shall set the FLS mod- ule's job result to MEMIF_JOB_FAILED and raise the runtime error FLS_E_VERIFY_- ERASE_FAILED .
requirement SWS_Fls_00023 [SWS_Fls_00023] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_Erase shall check that the FLS module is currently not busy. If this check fails, the function Fls_Erase shall reject the erase request, raise the development error FLS_E_BUSY and return with E_NOT_OK.
requirement SWS_Fls_00026 [SWS_Fls_00026] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Write shall check that the write start address (flash memory base ad- dress + TargetAddress ) is aligned to a flash page boundary and that it lies within the specified lower and upper flash address boundaries. If this check fails, the func- tion Fls_Write shall reject the write request, raise the development error FLS_E_- PARAM_ADDRESS and return with E_NOT_OK.
requirement SWS_Fls_00027 [SWS_Fls_00027] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Write shall check that the write length is greater than 0, that the write end address (write start address + length) is aligned to a flash page boundary and that it lies within the specified upper flash address boundary. If this check fails, the func- tion Fls_Write shall reject the write request, raise the development error FLS_E_- PARAM_LENGTH and return with E_NOT_OK.
requirement SWS_Fls_00030 [SWS_Fls_00030] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_Write shall check that the FLS module is currently not busy. If this check fails, the function Fls_Write shall reject the write request, raise the development error FLS_E_BUSY and return with E_NOT_OK.
requirement SWS_Fls_00033 [SWS_Fls_00033] 📄 PDF
The function Fls_Cancel shall set the job result to MEMIF_JOB_ CANCELED if the job result currently has the value MEMIF_JOB_PENDING. Other- wise the function Fls_Cancel shall leave the job result unchanged.
requirement SWS_Fls_00034 [SWS_Fls_00034] 📄 PDF
The function Fls_GetStatus shall return the FLS module state synchronously.
requirement SWS_Fls_00035 [SWS_Fls_00035] 📄 PDF
The function Fls_GetJobResult shall return the result of the last job synchronously
requirement SWS_Fls_00036 [SWS_Fls_00036] 📄 PDF
The erase, write, read and compare functions shall share the same job result, i.e. only the result of the last job can be queried. The FLS module shall overwrite the job result with MEMIF_JOB_PENDING if the FLS module has accepted a new job.
requirement SWS_Fls_00037 [SWS_Fls_00037] 📄 PDF
The function Fls_MainFunction shall perform the processing of the flash read, write, erase and compare jobs.
requirement SWS_Fls_00038 [SWS_Fls_00038] 📄 PDF
When a job has been initiated, the FLS module's environment shall call the function Fls_MainFunction cyclically until the job is finished.
requirement SWS_Fls_00039 [SWS_Fls_00039] 📄 PDF
The function Fls_MainFunction shall return without any action if no job is pending.
requirement SWS_Fls_00040 [SWS_Fls_00040] 📄 PDF
The function Fls_MainFunction shall only process as much data in one call cycle as statically configured for the current job type (read, write or compare) and the current FLS module's operating mode (normal, fast).
requirement SWS_Fls_00048 [SWS_Fls_00048] 📄 PDF
If supported by hardware, the function Fls_Init shall set the flash memory erase/write protection as provided in the configuration set.
requirement SWS_Fls_00055 [SWS_Fls_00055] 📄 PDF
If erase verification is enabled (compile switch FlsEraseVer- ificationEnabled set to TRUE): Before writing a flash block, the function Fls_- MainFunction shall compare the contents of the addressed memory area against the value of an erased flash cell to check that the block has been completely erased. If this check fails, the function Fls_MainFunction shall set the FLS module's job result to MEMIF_JOB_FAILED and raise the runtime error FLS_E_VERIFY_ERASE_FAILED .
requirement SWS_Fls_00056 [SWS_Fls_00056] 📄 PDF
If write verification is enabled (compile switch FlsWriteVerifi- cationEnabled set to TRUE): After writing a flash block, the function Fls_Main- Function shall compare the contents of the reprogrammed memory area against the contents of the provided application buffer to check that the block has been completely reprogrammed. If this check fails, the function Fls_MainFunction shall set the FLS module's job result to MEMIF_JOB_FAILED and raise the runtime error FLS_E_VER- IFY_WRITE_FAILED .
requirement SWS_Fls_00065 [SWS_Fls_00065] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Erase shall check that the FLS module has been initialized. If this check fails, the function Fls_Erase shall reject the erase request, raise the development error FLS_E_UNINIT and return with E_NOT_OK.
requirement SWS_Fls_00066 [SWS_Fls_00066] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Write shall check that the FLS module has been initialized. If this check fails, the function Fls_Write shall reject the write request, raise the development error FLS_E_UNINIT and return with E_NOT_OK.
requirement SWS_Fls_00086 [SWS_Fls_00086] 📄 PDF
The function Fls_Init shall initialize all FLS module global vari- ables and those controller registers that are needed for controlling the flash device and that do not influence or depend on other (hardware) modules. Registers that can in- fluence or depend on other modules shall be initialized by a common system module.
requirement SWS_Fls_00088 [SWS_Fls_00088] 📄 PDF
The functional requirements [2] and the functional scope are the same for both internal and external drivers. Hence the API is semantically identical.
requirement SWS_Fls_00097 [SWS_Fls_00097] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Read shall check that the read start address (flash memory base address + SourceAddress ) lies within the specified lower and upper flash address bound- aries. If this check fails, the function Fls_Read shall reject the read job, raise de- velopment error FLS_E_PARAM_ADDRESS and return with E_NOT_OK.
requirement SWS_Fls_00098 [SWS_Fls_00098] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Read shall check that the read length is greater than 0 and that the read end address (read start address + length) lies within the specified upper flash address boundary. If this check fails, the function Fls_Read shall reject the read job, raise the development error FLS_E_PARAM_LENGTH and return with E_NOT_OK.
requirement SWS_Fls_00099 [SWS_Fls_00099] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Read shall check that the driver has been initialized. If this check fails, the function Fls_Read shall reject the read request, raise the development error FLS_- E_UNINIT and return with E_NOT_OK.
requirement SWS_Fls_00100 [SWS_Fls_00100] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_Read shall check that the driver is currently not busy. If this check fails, the function Fls_Read shall reject the read request, raise the development error FLS_- E_BUSY and return with E_NOT_OK.
requirement SWS_Fls_00104 [SWS_Fls_00104] 📄 PDF
The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_ERASE_FAILED to the DET if a flash erase job fails due to a hardware error.
requirement SWS_Fls_00105 [SWS_Fls_00105] 📄 PDF
The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_WRITE_FAILED to the DET if a flash write job fails due to a hardware error.
requirement SWS_Fls_00106 [SWS_Fls_00106] 📄 PDF
The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_READ_FAILED to the DET if a flash read job fails due to a hardware error.
requirement SWS_Fls_00110 [SWS_Fls_00110] 📄 PDF
The callback notifications shall have no parameters and no return value.
requirement SWS_Fls_00137 [SWS_Fls_00137] 📄 PDF
The FLS module's implementer shall place the code of the flash access routines into a separate C-module Fls_ac.c.
requirement SWS_Fls_00140 [SWS_Fls_00140] 📄 PDF
The FLS module's erase routine shall load the flash access code for erasing the flash memory to the location in RAM pointed to by the erase function pointer contained in the flash drivers configuration set if the FLS module is configured to load the flash access code to RAM on job start.
requirement SWS_Fls_00141 [SWS_Fls_00141] 📄 PDF
The FLS module's write routine shall load the flash access code for writing the flash memory to the location in RAM pointed to by the write function pointer contained in the flash drivers configuration set if the FLS module is configured to load the flash access code to RAM on job start.
requirement SWS_Fls_00143 [SWS_Fls_00143] 📄 PDF
After an erase or write job has been finished or canceled, the FLS module's main processing routine shall unload (i.e. overwrite) the flash access code (internal erase / write routines) from RAM if they have been loaded to RAM by the flash driver.
requirement SWS_Fls_00144 [SWS_Fls_00144] 📄 PDF
During the initialization of the external flash driver, the FLS module shall check the hardware ID of the external flash device against the corresponding published parameter. If a hardware ID mismatch occurs, the FLS module shall report the error code FLS_E_UNEXPECTED_FLASH_ID to the Default Error Tracer (DET), set the FLS module status to FLS_E_UNINIT and shall not initialize itself.
requirement SWS_Fls_00145 [SWS_Fls_00145] 📄 PDF
If possible, e.g. with interrupt controlled implementations, the FLS module shall start the first round of the erase job directly within the function Fls_- Erase to reduce overall runtime.
requirement SWS_Fls_00146 [SWS_Fls_00146] 📄 PDF
If possible, e.g. with interrupt controlled implementations, the FLS module shall start the first round of the write job directly within the function Fls_Write to reduce overall runtime.
requirement SWS_Fls_00147 [SWS_Fls_00147] 📄 PDF
If configured, the function Fls_Cancel shall call the error notifi- cation function to inform the caller about the cancellation of a job.
requirement SWS_Fls_00150 [SWS_Fls_00150] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the compare start address (flash memory base address + SourceAddress ) lies within the specified lower and upper flash address boundaries. If this check fails, the function Fls_Compare shall reject the compare job, raise the development error FLS_E_PARAM_ADDRESS and return with E_NOT_OK.
requirement SWS_Fls_00151 [SWS_Fls_00151] 📄 PDF
If If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the given length is greater than 0 and that the compare end address (compare start address + length) lies within the specified upper flash address boundary. If this check fails, the function Fls_Compare shall reject the compare job, raise the development error FLS_E_PARAM_LENGTH and return with E_ NOT_OK.
requirement SWS_Fls_00152 [SWS_Fls_00152] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Compare shall check that the driver has been initialized. If this check fails, the function Fls_Compare shall reject the compare job, raise the development error FLS_E_UNINIT and return with E_NOT_OK.
requirement SWS_Fls_00153 [SWS_Fls_00153] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_Compare shall check that the driver is currently not busy. If this check fails, the function Fls_Compare shall reject the compare job, raise the development error FLS_E_BUSY and return with E_NOT_OK.
requirement SWS_Fls_00154 [SWS_Fls_00154] 📄 PDF
The function Fls_MainFunction shall set the job result to MEMIF_JOB_FAILED and report the error code FLS_E_COMPARE_FAILED to the DET if a flash compare job fails due to a hardware error.
requirement SWS_Fls_00155 [SWS_Fls_00155] 📄 PDF
The function Fls_SetMode shall set the FLS module's operation mode to the given "Mode" parameter.
requirement SWS_Fls_00156 [SWS_Fls_00156] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_SetMode shall check that the FLS module is currently not busy. If this check fails, the function Fls_SetMode shall reject the set mode request and raise the devel- opment error code FLS_E_BUSY .
requirement SWS_Fls_00157 [SWS_Fls_00157] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Write shall check the given data buffer pointer for not being a null pointer. If the data buffer pointer is a null pointer, the function Fls_Write shall re- ject the write request, raise the development error FLS_E_PARAM_DATA and return with E_NOT_OK.
requirement SWS_Fls_00158 [SWS_Fls_00158] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Read shall check the given data buffer pointer for not being a null pointer. If the data buffer pointer is a null pointer, the function Fls_Read shall reject the read request, raise the development error FLS_E_PARAM_DATA and return with E_NOT_ OK.
requirement SWS_Fls_00167 [SWS_Fls_00167] 📄 PDF
The FLS module shall call the callback function Fee_JobEndNo- tification when the module has completed a job with a positive result: • Read job finished & OK • Write job finished & OK • Erase job finished & OK • Compare job finished & memory blocks are the same
requirement SWS_Fls_00183 [SWS_Fls_00183] 📄 PDF
The function Fls_Cancel shall be pre-compile time configurable On/Off by the configuration parameter FlsCancelApi .
requirement SWS_Fls_00184 [SWS_Fls_00184] 📄 PDF
The function Fls_GetStatus shall be pre-compile time config- urable On/Off by the configuration parameter FlsGetStatusApi .
requirement SWS_Fls_00185 [SWS_Fls_00185] 📄 PDF
The function Fls_GetJobResult shall be pre-compile time configurable On/Off by the configuration parameter FlsGetJobResultApi .
requirement SWS_Fls_00186 [SWS_Fls_00186] 📄 PDF
The function Fls_Compare shall be pre-compile time config- urable On/Off by the configuration parameter FlsCompareApi .
requirement SWS_Fls_00187 [SWS_Fls_00187] 📄 PDF
The function Fls_SetMode shall be pre-compile time config- urable On/Off by the configuration parameter FlsSetModeApi .
requirement SWS_Fls_00191 [SWS_Fls_00191] 📄 PDF
The function Fls_Init shall store the pointer to the given config- uration set in a variable in order to allow the FLS module access to the configuration set contents during runtime.
requirement SWS_Fls_00193 [SWS_Fls_00193] 📄 PDF
Depending on implementation, callback routines provided and/or invoked by the FLS module may be called on interrupt level. The module providing those routines has therefore to make sure that their runtime is reasonably short, i.e. since callbacks may be propagated upward through several software layers.
requirement SWS_Fls_00196 [SWS_Fls_00196] 📄 PDF
The function Fls_MainFunction shall at the most issue one sector erase command (to the hardware) in each cycle.
requirement SWS_Fls_00200 [SWS_Fls_00200] 📄 PDF
The function Fls_MainFunction shall set the job result to MEMIF_BLOCK_INCONSISTENT if the compared data from a flash compare job are not equal.
requirement SWS_Fls_00205 [SWS_Fls_00205] 📄 PDF
The FLS module shall check static configuration parameters stat- ically (at the latest during compile time) for correctness.
requirement SWS_Fls_00206 [SWS_Fls_00206] 📄 PDF
The FLS module shall validate the version information in the FLS module header and source files for consistency (e.g. by comparing the version infor- mation in the module header and source files with a pre-processor macro).
requirement SWS_Fls_00208 [SWS_Fls_00208] 📄 PDF
The FLS module shall combine all available flash memory areas into one linear address space (denoted by the parameters FlsBaseAddress and FlsTotalSize ).
requirement SWS_Fls_00209 [SWS_Fls_00209] 📄 PDF
The FLS module shall map the address and length parameters for the read, write, erase and compare functions as "virtual" addresses to the physical addresses according to the physical structure of the flash memory areas.
requirement SWS_Fls_00211 [SWS_Fls_00211] 📄 PDF
The FLS module's implementer shall keep the execution time for the flash access code as short as possible.
requirement SWS_Fls_00212 [SWS_Fls_00212] 📄 PDF
The FLS module's main processing routine shall execute the flash access code routines.
requirement SWS_Fls_00213 [SWS_Fls_00213] 📄 PDF
The FLS module's main processing routine shall access the flash access code routines by means of the respective function pointer contained in the FLS module's configuration set (post-compile parameters) regardless whether the flash access code routines have been loaded to RAM or whether they can be executed directly from (flash) ROM.
requirement SWS_Fls_00214 [SWS_Fls_00214] 📄 PDF
The FLS module shall only load the access code to the RAM if the access code cannot be executed out of flash ROM.
requirement SWS_Fls_00215 [SWS_Fls_00215] 📄 PDF
The FLS module's flash access routines shall only disable inter- rupts and wait for the completion of the erase / write command if necessary (that is if it has to be ensured that no other code is executed in the meantime).
requirement SWS_Fls_00216 [SWS_Fls_00216] 📄 PDF
The type Fls_AddressType shall have 0 as lower limit for each flash device.
requirement SWS_Fls_00217 [SWS_Fls_00217] 📄 PDF
The FLS module shall add a device specific base address to the address type Fls_AddressType if necessary.
requirement SWS_Fls_00218 [SWS_Fls_00218] 📄 PDF
The job of the function Fls_Erase shall erase one or more com- plete flash sectors.
requirement SWS_Fls_00220 [SWS_Fls_00220] 📄 PDF
The FLS module shall execute the job of the function Fls_Erase asynchronously within the FLS module's main function.
requirement SWS_Fls_00221 [SWS_Fls_00221] 📄 PDF
The job of the function Fls_Erase shall erase a flash memory block starting from the flash memory base address + TargetAddress of size Length. Note: Length will be rounded up to the next full sector boundary since only complete flash sectors can be erased.
requirement SWS_Fls_00223 [SWS_Fls_00223] 📄 PDF
The job of the function Fls_Write shall write one or more com- plete flash pages to the flash device.
requirement SWS_Fls_00225 [SWS_Fls_00225] 📄 PDF
The FLS module shall execute the write job of the function Fls_- Write asynchronously within the FLS module's main function.
requirement SWS_Fls_00226 [SWS_Fls_00226] 📄 PDF
The job of the function Fls_Write shall program a flash memory block with data provided via SourceAddressPtr starting from the flash memory base address + TargetAddress of size Length.
requirement SWS_Fls_00229 [SWS_Fls_00229] 📄 PDF
The function Fls_Cancel shall cancel an ongoing flash read, write, erase or compare job.
requirement SWS_Fls_00230 [SWS_Fls_00230] 📄 PDF
The function Fls_Cancel shall abort a running job synchronously so that directly after returning from this function a new job can be started.
requirement SWS_Fls_00232 [SWS_Fls_00232] 📄 PDF
The configuration parameter FlsUseInterrupts shall switch between interrupt and polling controlled job processing if this is supported by the flash memory hardware.
requirement SWS_Fls_00233 [SWS_Fls_00233] 📄 PDF
The FLS module's implementer shall locate the interrupt service routine in Fls_Irq.c.
requirement SWS_Fls_00234 [SWS_Fls_00234] 📄 PDF
If interrupt controlled job processing is supported and enabled with the configuration parameter FlsUseInterrupts, the interrupt service routine shall reset the interrupt flag, check for errors reported by the underlying hardware, reload the hard- ware finite state machine for the next round of the pending job or call the appropriate notification routine if the job is finished or aborted.
requirement SWS_Fls_00235 [SWS_Fls_00235] 📄 PDF
The function Fls_MainFunction shall process jobs without hardware interrupt support (e.g. read jobs).
requirement SWS_Fls_00236 [SWS_Fls_00236] 📄 PDF
The function Fls_Read shall read from flash memory.
requirement SWS_Fls_00238 [SWS_Fls_00238] 📄 PDF
The FLS module shall execute the read job of the function Fls_Read asynchronously within the FLS module's main function.
requirement SWS_Fls_00239 [SWS_Fls_00239] 📄 PDF
The read job of the function Fls_Read shall copy a continuous flash memory block starting from the flash memory base address + SourceAddress of size Length to the buffer pointed to by TargetAddressPtr .
requirement SWS_Fls_00240 [SWS_Fls_00240] 📄 PDF
The FLS module's environment shall only call the function Fls_- Read after the FLS module has been initialized.
requirement SWS_Fls_00241 [SWS_Fls_00241] 📄 PDF
The function Fls_Compare shall compare the contents of an area of flash memory with that of an application data buffer.
requirement SWS_Fls_00243 [SWS_Fls_00243] 📄 PDF
The FLS module shall execute the job of the function Fls_- Compare asynchronously within the FLS module's main function.
requirement SWS_Fls_00244 [SWS_Fls_00244] 📄 PDF
The job of the function Fls_Compare shall compare a continuous flash memory block starting from the flash memory base address + SourceAddress of size Length with the buffer pointed to by TargetAddressPtr .
requirement SWS_Fls_00248 [SWS_Fls_00248] 📄 PDF
Module Header File Imported Type 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_Fls_00260 [SWS_Fls_00260] 📄 PDF
Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called.
requirement SWS_Fls_00261 [SWS_Fls_00261] 📄 PDF
Det_ReportError Det.h Service to report development errors.
requirement SWS_Fls_00268 [SWS_Fls_00268] 📄 PDF
If runtime error detection for the module Fls is enabled: the func- tion Fls_Init shall check module initialization status. If the module has already been initialized, the function Fls_Init shall raise the development error FLS_E_- ALREADY_INITIALIZED .
requirement SWS_Fls_00269 [SWS_Fls_00269] 📄 PDF
The Fls module shall provide only one scheduled function. Read- ing from / writing to flash memory cannot usually be done simultaneously and the over- head for synchronizing two scheduled functions would outweigh the benefits.
requirement SWS_Fls_00272 [SWS_Fls_00272] 📄 PDF
If timeout supervision is enabled (compile switch FlsTimeoutSu- pervisionEnabled set to TRUE): the function Fls_MainFunction shall provide a timeout monitoring for the currently running job, that is it shall supervise the deadline of the read / compare / erase or write job.
requirement SWS_Fls_00273 [SWS_Fls_00273] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Compare shall check the given data buffer pointer for not being a null pointer. If the data buffer pointer is a null pointer, the function Fls_Compare shall reject the request, raise the development error FLS_E_PARAM_DATA and return with E_NOT_OK.
requirement SWS_Fls_00310 [SWS_Fls_00310] 📄 PDF
The following development error codes shall be reported when an API service is called with a wrong parameter: FLS_E_PARAM_CONFIG , FLS_- E_PARAM_ADDRESS , FLS_E_PARAM_LENGTH , FLS_E_PARAM_DATA .
requirement SWS_Fls_00312 [SWS_Fls_00312] 📄 PDF
The runtime error code FLS_E_BUSY shall be reported when an API service is called while the module is still busy.
requirement SWS_Fls_00313 [SWS_Fls_00313] 📄 PDF
The runtime error code FLS_E_VERIFY_ERASE_FAILED shall be reported when the erase verification function is enabled (by the com- pile switch FlsEraseVerificationEnabled ) and the erase verification func- tion (blankcheck) failed.
requirement SWS_Fls_00314 [SWS_Fls_00314] 📄 PDF
The runtime error code FLS_E_VERIFY_WRITE_FAILED shall be reported when the write verification function is enabled (by the compile switch FlsWriteVerificationEnabled ) and the write verification function (com- pare) failed.
requirement SWS_Fls_00315 [SWS_Fls_00315] 📄 PDF
The transient fault code FLS_E_ERASE_FAILED shall be reported when the flash erase function failed (in hardware).
requirement SWS_Fls_00316 [SWS_Fls_00316] 📄 PDF
The transient fault code FLS_E_WRITE_FAILED shall be reported when the flash write function failed (in hardware).
requirement SWS_Fls_00317 [SWS_Fls_00317] 📄 PDF
The transient fault code FLS_E_READ_FAILED shall be reported when the flash read function failed (in hardware).
requirement SWS_Fls_00318 [SWS_Fls_00318] 📄 PDF
The transient fault code FLS_E_COMPARE_FAILED shall be re- ported when the flash compare function failed (in hardware).
requirement SWS_Fls_00319 [SWS_Fls_00319] 📄 PDF
The transient fault code FLS_E_UNEXPECTED_FLASH_ID shall be reported when the expected flash ID is not matched (see [SWS_Fls_00144]).
requirement SWS_Fls_00323 [SWS_Fls_00323] 📄 PDF
The function Fls_Init shall set the FLS module state to MEMIF_ IDLE after having finished the FLS module initialization.
requirement SWS_Fls_00324 [SWS_Fls_00324] 📄 PDF
The function Fls_Init shall set the flash job result to MEMIF_ JOB_OK after having finished the FLS module initialization.
requirement SWS_Fls_00327 [SWS_Fls_00327] 📄 PDF
The function Fls_Erase shall copy the given parameters to FLS module internal variables and initiate an erase job.
requirement SWS_Fls_00328 [SWS_Fls_00328] 📄 PDF
After initiating the erase job, the function Fls_Erase shall set the FLS module status to MEMIF_BUSY.
requirement SWS_Fls_00329 [SWS_Fls_00329] 📄 PDF
After initiating the erase job, the function Fls_Erase shall set the job result to MEMIF_JOB_PENDING.
requirement SWS_Fls_00330 [SWS_Fls_00330] 📄 PDF
After initiating the erase job, the function Fls_Erase shall return with E_OK.
requirement SWS_Fls_00331 [SWS_Fls_00331] 📄 PDF
The function Fls_Write shall copy the given parameters to Fls module internal variables and initiate a write job.
requirement SWS_Fls_00332 [SWS_Fls_00332] 📄 PDF
After initiating the write job, the function Fls_Write shall set the FLS module status to MEMIF_BUSY.
requirement SWS_Fls_00333 [SWS_Fls_00333] 📄 PDF
After initiating the write job, the function Fls_Write shall set the job result to MEMIF_JOB_PENDING.
requirement SWS_Fls_00334 [SWS_Fls_00334] 📄 PDF
After initiating the write job, the function Fls_Write shall return with E_OK.
requirement SWS_Fls_00335 [SWS_Fls_00335] 📄 PDF
The function Fls_Cancel shall reset the FLS module's internal job processing variables (like address, length and data pointer).
requirement SWS_Fls_00336 [SWS_Fls_00336] 📄 PDF
The function Fls_Cancel shall set the FLS module state to MEMIF_IDLE.
requirement SWS_Fls_00337 [SWS_Fls_00337] 📄 PDF
The function Fls_Read shall copy the given parameters to FLS module internal variables and initiate a read job.
requirement SWS_Fls_00338 [SWS_Fls_00338] 📄 PDF
After initiating a read job, the function Fls_Read shall set the FLS module status to MEMIF_BUSY.
requirement SWS_Fls_00339 [SWS_Fls_00339] 📄 PDF
After initiating a read job, the function Fls_Read shall set the FLS module job result to MEMIF_JOB_PENDING.
requirement SWS_Fls_00340 [SWS_Fls_00340] 📄 PDF
After initiating a read job, the function Fls_Read shall return with E_OK.
requirement SWS_Fls_00341 [SWS_Fls_00341] 📄 PDF
The function Fls_Compare shall copy the given parameters to Fls module internal variables and initiate a compare job.
requirement SWS_Fls_00342 [SWS_Fls_00342] 📄 PDF
After initiating the compare job, the function Fls_Compare shall set the status to MEMIF_BUSY.
requirement SWS_Fls_00343 [SWS_Fls_00343] 📄 PDF
After initiating the compare job, the function Fls_Compare shall set the job result to MEMIF_JOB_PENDING.
requirement SWS_Fls_00344 [SWS_Fls_00344] 📄 PDF
After initiating the compare job, the function Fls_Compare shall return with E_OK.
requirement SWS_Fls_00345 [SWS_Fls_00345] 📄 PDF
After a read, erase, write or compare job has been finished, the function Fls_MainFunction shall set the FLS module's job result to MEMIF_JOB_ OK if it is currently in state MEMIF_JOB_PENDING. Otherwise, it shall leave the result unchanged.
requirement SWS_Fls_00346 [SWS_Fls_00346] 📄 PDF
After a read, erase, write or compare job has been finished, the function Fls_MainFunction shall set the FLS module's state to MEMIF_IDLE and call the job end notification function if configured (see [ECUC_Fls_00307]).
requirement SWS_Fls_00347 [SWS_Fls_00347] 📄 PDF
The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has finished a job with a negative result: • Read job failed • Write job failed • Erase job failed • Compare job failed
requirement SWS_Fls_00348 [SWS_Fls_00348] 📄 PDF
The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has canceled an ongoing job: • Read job aborted • Write job aborted • Erase job aborted • Compare job aborted
requirement SWS_Fls_00349 [SWS_Fls_00349] 📄 PDF
The FLS module shall call the callback function Fee_JobEr- rorNotification when the module has finished a compare job and the memory blocks differ: • Compare job finished and memory blocks differ
requirement SWS_Fls_00352 [SWS_Fls_00352] 📄 PDF
The table above specifies the parameters that shall be located in an external data structure of type Fls_ConfigType .
requirement SWS_Fls_00353 [SWS_Fls_00353] 📄 PDF
The organization and location of the data structure Fls_Config- Type shall be up to the implementer.
requirement SWS_Fls_00355 [SWS_Fls_00355] 📄 PDF
Hardware or implementation specific parameters can be added to Fls_ConfigType if necessary.
requirement SWS_Fls_00356 [SWS_Fls_00356] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_Cancel shall check that the FLS module has been initialized. If this check fails, the function Fls_Cancel shall raise the development error FLS_E_- UNINIT and return.
requirement SWS_Fls_00358 [SWS_Fls_00358] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_GetJobResult shall check that the FLS module has been initialized. If this check fails, the function Fls_GetJobResult shall raise the development error FLS_E_UNINIT and return with MEMIF_JOB_FAILED.
requirement SWS_Fls_00359 [SWS_Fls_00359] 📄 PDF
If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction shall check, whether the configured maximum erase time (see [ECUC_Fls_00298] FlsErase- Time ) has been exceeded. If this is the case, the function Fls_MainFunction shall raise the runtime error FLS_E_TIMEOUT .
requirement SWS_Fls_00360 [SWS_Fls_00360] 📄 PDF
If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction shall check, whether the expected maximum write time (see note below) has been exceeded. If this is the case, the function Fls_MainFunction shall raise the runtime error FLS_E_- TIMEOUT .
requirement SWS_Fls_00361 [SWS_Fls_00361] 📄 PDF
The runtime error code FLS_E_TIMEOUT shall be reported when the timeout supervision function is enabled (by the compile switch FlsTimeoutSu- pervisionEnabled ) and the timeout supervision of a read, write, erase or compare job (in hardware) failed.
requirement SWS_Fls_00362 [SWS_Fls_00362] 📄 PDF
If timeout supervision is enabled (compile switch FlsTimeout- SupervisionEnabled set to TRUE): the function Fls_MainFunction shall check, whether the expected maximum read / compare time (see note below) has been ex- ceeded. If this is the case, the function Fls_MainFunction shall raise the runtime error FLS_E_TIMEOUT .
requirement SWS_Fls_00363 [SWS_Fls_00363] 📄 PDF
If development error detection for the module Fls is enabled: the function Fls_GetVersionInfo shall raise the development error FLS_E_PARAM_- POINTER if the argument is a NULL pointer and return without any action.
requirement SWS_Fls_00373 [SWS_Fls_00373] 📄 PDF
The function Fls_BlankCheck shall verify, whether a given mem- ory area has been erased but not (yet) re-programmed.
requirement SWS_Fls_00374 [SWS_Fls_00374] 📄 PDF
The function Fls_BlankCheck shall copy the given parameters to FLS module internal variables and initiate the verification job.
requirement SWS_Fls_00375 [SWS_Fls_00375] 📄 PDF
After initiating the verification job, the function Fls_BlankCheck shall set the FLS module status to MEMIF_BUSY.
requirement SWS_Fls_00376 [SWS_Fls_00376] 📄 PDF
After initiating the verification job, the function Fls_BlankCheck shall set the FLS module job result to MEMIF_JOB_PENDING.
requirement SWS_Fls_00377 [SWS_Fls_00377] 📄 PDF
After initiating the verification job, the function Fls_BlankCheck shall return with E_OK.
requirement SWS_Fls_00378 [SWS_Fls_00378] 📄 PDF
The FLS module shall execute the verification job of the function Fls_BlankCheck asynchronously within the FLS module's main function.
requirement SWS_Fls_00379 [SWS_Fls_00379] 📄 PDF
The verification job of the function Fls_BlankCheck shall check, that the continuous flash memory area starting from the flash memory base address + TargetAddress of size Length is erased.
requirement SWS_Fls_00380 [SWS_Fls_00380] 📄 PDF
If development error detection for the module FLS is enabled; the function Fls_BlankCheck shall check that the verification start address (flash mem- ory base address + TargetAddress ) lies within the specified lower and upper flash address boundaries. If this check fails, the function Fls_BlankCheck shall reject the verification job, raise the development error FLS_E_PARAM_ADDRESS and return with E_NOT_OK.
requirement SWS_Fls_00381 [SWS_Fls_00381] 📄 PDF
If development error detection for the module FLS is enabled: the function Fls_BlankCheck shall check that the given length is greater than 0 and that the verification end address (verification start address + length) lies within the specified upper flash address boundary. If this check fails, the function Fls_BlankCheck shall reject the verification job, raise the development error FLS_E_PARAM_LENGTH and return with E_NOT_OK.
requirement SWS_Fls_00382 [SWS_Fls_00382] 📄 PDF
If development error detection for the module FLS is enabled: the function Fls_BlankCheck shall check that the driver has been initialized. If this check fails, the function Fls_BlankCheck shall reject the verification request, raise the de- velopment error FLS_E_UNINIT and return with E_NOT_OK.
requirement SWS_Fls_00383 [SWS_Fls_00383] 📄 PDF
If runtime error detection for the module FLS is enabled: the func- tion Fls_BlankCheck shall check that the driver is currently not busy. If this check fails, the function Fls_BlankCheck shall reject the verification request, raise the de- velopment error FLS_E_BUSY and return with E_NOT_OK.
requirement SWS_Fls_00385 [SWS_Fls_00385] 📄 PDF
If the underlying flash technology requires a certain alignment of the read address or length information and if the address and/or length parameter for a read or compare Job are not correctly aligned, the function Fls_MainFunction shall internally compensate for this missing alignment, that is the function Fls_Main- Function shall provide byte-wise read access to the flash memory, regardless of any alignment restrictions imposed by the Hardware.
requirement SWS_Fls_00389 [SWS_Fls_00389] 📄 PDF
The FLS module shall handle data buffer alignment internally. In- stead of imposing any requirements on RAM buffers' alignments (as they are uint8*), it shall handle passed pointers as being just byte-aligned.
requirement SWS_Fls_00390 [SWS_Fls_00390] 📄 PDF
If more than one instance of the flash driver is used in an ECU, the individual instances have to be given a unique instance ID. This instance ID shall be configured as the parameter FlsDriverIndex . If only one instance of the flash driver is used in an ECU, this instance shall have the parameter FlsDriverIndex configured as 0.
requirement SWS_Fls_91001 [SWS_Fls_91001] 📄 PDF
Type of error Related error code Error value API service called while driver still busy FLS_E_BUSY 0x06 Erase verification (blank check) failed FLS_E_VERIFY_ERASE_FAILED 0x07 Write verification (compare) failed FLS_E_VERIFY_WRITE_FAILED 0x08 Timeout exceeded FLS_E_TIMEOUT 0x09
requirement SWS_Fls_91002 [SWS_Fls_91002] 📄 PDF
Type of error Related error code Error value Flash erase failed (HW) FLS_E_ERASE_FAILED 0x01 Flash write failed (HW) FLS_E_WRITE_FAILED 0x02 Flash read failed (HW) FLS_E_READ_FAILED 0x03 Flash compare failed (HW) FLS_E_COMPARE_FAILED 0x04 Expected hardware ID not matched (see SWS_ Fls_00144) FLS_E_UNEXPECTED_FLASH_ID 0x05
requirement SWS_Fls_NA_00366 [SWS_Fls_NA_00366] 📄 PDF
These requirements are not applicable to this specifica- tion.
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Fls- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Fls@rel:R20-11#9cc16485- Content hash
9cc16485- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_FlashDriver.pdf#nameddest=SWS_Fls_00249