MCUSW
Fls.h File Reference

Introduction

This file contains interface header for Fls MCAL driver.

Go to the source code of this file.

Data Structures

struct  Fls_SectorType
 FLS Module Flashable Sectors and pages. More...
 
struct  Fls_ConfigType
 FLS Module Configuration Structure. More...
 

Macros

FLS Driver ISR category level

Defines for FLS Driver ISR ISR category level

#define FLS_ISR_VOID   (0x00U)
 void ISR type More...
 
#define FLS_ISR_CAT1   (0x01U)
 Category 1 ISR type. More...
 
#define FLS_ISR_CAT2   (0x02U)
 Category 2 ISR type. More...
 
FLS Driver Module SW Version Info

Defines for FLS Driver version used for compatibility checks

#define FLS_SW_MAJOR_VERSION   (10U)
 Driver Implementation Major Version. More...
 
#define FLS_SW_MINOR_VERSION   (1U)
 Driver Implementation Minor Version. More...
 
#define FLS_SW_PATCH_VERSION   (0U)
 Driver Implementation Patch Version. More...
 
FLS Driver Module AUTOSAR Version Info

Defines for FLS Driver AUTOSAR version used for compatibility checks

#define FLS_AR_RELEASE_MAJOR_VERSION   (4U)
 AUTOSAR Major version specification implemented by FLS Driver. More...
 
#define FLS_AR_RELEASE_MINOR_VERSION   (3U)
 AUTOSAR Minor version specification implemented by FLS Driver. More...
 
#define FLS_AR_RELEASE_REVISION_VERSION   (1U)
 AUTOSAR Patch version specification implemented by FLS Driver. More...
 
FLS Driver ID Info
#define FLS_VENDOR_ID   ((uint16) 44U)
 Texas Instruments Vendor ID. More...
 
#define FLS_MODULE_ID   ((uint16) 92U)
 FLS Driver Module ID. More...
 
#define FLS_INSTANCE_ID   ((uint8) 0U)
 FLS Driver Instance ID. More...
 
FLS Error Codes

Error codes returned by FLS functions

#define FLS_E_PARAM_CONFIG   ((uint8) 0x01U)
 API service called with wrong parameter. More...
 
#define FLS_E_PARAM_ADDRESS   ((uint8) 0x02U)
 API service called with wrong parameter. More...
 
#define FLS_E_PARAM_LENGTH   ((uint8) 0x03U)
 API service called with wrong parameter. More...
 
#define FLS_E_PARAM_DATA   ((uint8) 0x04U)
 API service called with wrong parameter. More...
 
#define FLS_E_UNINIT   ((uint8) 0x05U)
 API service used without module initiali-zation. More...
 
#define FLS_E_BUSY   ((uint8) 0x06U)
 APIs called when module is busy. More...
 
#define FLS_E_PARAM_POINTER   ((uint8) 0x0AU)
 APIs called with a Null Pointer. More...
 
#define FLS_E_VERIFY_ERASE_FAILED   ((uint8) 0x07U)
 APIs service Erase Verification (BlankCheck) failed. More...
 
#define FLS_E_VERIFY_WRITE_FAILED   ((uint8) 0x08U)
 APIs serice Write Verification (Compare) failed. More...
 
#define FLS_E_TIMEOUT   ((uint8) 0x09U)
 APIs Timeout Exceeded. More...
 
#define FLS_E_ERASE_FAILED   ((uint8) 0x01U)
 Flash Erase Failed in HW. More...
 
#define FLS_E_WRITE_FAILED   ((uint8) 0x02U)
 Flash Write Failed in HW. More...
 
#define FLS_E_READ_FAILED   ((uint8) 0x03U)
 Flash Read Failed in HW. More...
 
#define FLS_E_COMPARE_FAILED   ((uint8) 0x04U)
 Flash Compare Failediin HW. More...
 
#define FLS_E_UNEXPECTED_FLASH_ID   ((uint8) 0x05U)
 Expected HW ID not matched. More...
 
FLS Service Ids

The Service Id is one of the argument to Det_ReportError function and is used to identify the source of the error

#define FLS_SID_INIT   ((uint8) 0x00U)
 FLS_Init() API Service ID. More...
 
#define FLS_SID_ERASE   ((uint8) 0x01U)
 FLS_Erase() API Service ID. More...
 
#define FLS_SID_WRITE   ((uint8) 0x02U)
 FLS_Write() API Service ID. More...
 
#define FLS_SID_CANCEL   ((uint8) 0x03U)
 FLS_Cancel() API Service ID. More...
 
#define FLS_SID_GET_STATUS   ((uint8) 0x04U)
 FLS_GetStatus() API Service ID. More...
 
#define FLS_SID_GET_JOB_RESULT   ((uint8) 0x05U)
 Fls_GetJobResult() API Service ID. More...
 
#define FLS_SID_READ   ((uint8) 0x07U)
 FLS_Read() API Service ID. More...
 
#define FLS_SID_COMPARE   ((uint8) 0x08U)
 FLS_Compare() API Service ID. More...
 
#define FLS_SID_SET_MODE   ((uint8) 0x09U)
 FLS_SetMode() API Service ID. More...
 
#define FLS_SID_GET_VERSION_INFO   ((uint8) 0x10U)
 Fls_GetVersionInfo() API Service ID. More...
 
#define FLS_SID_BLANK_CHECK   ((uint8) 0x0AU)
 FLS_BlankCheck() API Service ID. More...
 
#define FLS_SID_MAIN_FUNCTION   ((uint8) 0x06U)
 FLS_MainFunction() API Service ID. More...
 

Typedefs

typedef uint32 Fls_AddressType
 Type of address type. More...
 
typedef uint32 Fls_LengthType
 

Enumerations

enum  OSPI_xferLines { OSPI_XFER_LINES_SINGLE = 0U, OSPI_XFER_LINES_DUAL, OSPI_XFER_LINES_QUAD, OSPI_XFER_LINES_OCTAL }
 Number of lines used for OSPI read/write transaction. More...
 

Functions

void Fls_SwitchMode (boolean dacEnable, boolean xipEnable)
 Switch Mode of the OSPI Driver Parameters (in) : boolean dacEnable - should DAC mode be enaled or disabled Parameters (in) : boolean xipEnable - should XIP mode be enaled or disabled Mode : Supervisor Mode (Privileged Mode) More...
 
void Fls_Init (const Fls_ConfigType *ConfigPtr)
 Initializes the Flash Driver. More...
 
Std_ReturnType Fls_Erase (Fls_AddressType TargetAddress, Fls_LengthType Length)
 Erases flash sector(s). More...
 
Std_ReturnType Fls_Write (Fls_AddressType TargetAddress, const uint8 *SourceAddressPtr, Fls_LengthType Length)
 Writes one or more complete flash pages. More...
 
Std_ReturnType Fls_Read (Fls_AddressType SourceAddress, uint8 *TargetAddressPtr, Fls_LengthType Length)
 Reads from flash memory.. More...
 
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. More...
 
Std_ReturnType Fls_BlankCheck (Fls_AddressType Address, Fls_LengthType Length)
 The function Fls_BlankCheck shall verify, whether a given memory area has been erased but not (yet) programmed. More...
 
MemIf_StatusType Fls_GetStatus (void)
 Returns the driver state. More...
 
Std_ReturnType Fls_GetVersionInfo (Std_VersionInfoType *versioninfo)
 This service returns the version information of this module. More...
 
MemIf_JobResultType Fls_GetJobResult (void)
 Returns the result of the last job. More...
 
void Fls_MainFunction (void)
 Performs the processing of jobs. More...
 
void Fls_Cancel (void)
 Cancels an ongoing job. More...