MCUSW
FLS Configuration

Introduction

This files defines FLS MCAL configuration structures

Data Structures

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

Variables

Fls_LengthType Fls_SectorType::numberOfSectors
 
Fls_LengthType Fls_SectorType::sectorPageSize
 
Fls_LengthType Fls_SectorType::sectorSize
 
Fls_AddressType Fls_SectorType::sectorStartaddress
 
Fls_JobEndNotifyType Fls_ConfigType::Fls_JobEndNotification
 
Fls_JobErrorNotifyType Fls_ConfigType::Fls_JobErrorNotification
 
uint32 Fls_ConfigType::maxReadNormalMode
 
uint32 Fls_ConfigType::maxWriteNormalMode
 
Fls_SectorType Fls_ConfigType::sectorList [FLS_NUMBER_OF_SECTOR_CFG]
 
uint32 Fls_ConfigType::currentSectorIndex
 
boolean Fls_ConfigType::dacEnable
 
boolean Fls_ConfigType::xipEnable
 
uint64 Fls_ConfigType::ospiClkSpeed
 
boolean Fls_ConfigType::dtrEnable
 
boolean Fls_ConfigType::phyEnable
 
OSPI_xferLines Fls_ConfigType::ospixferlines
 
uint32 Fls_ConfigType::flsBaudRateDiv
 
uint32 Fls_ConfigType::blockSize
 
FLASH_Protocol FlashConfig::FLS_PROTOCOL
 
uint32 FlashConfig::FOUR_BYTE_ADDR_ENABLE
 
uint32 FlashConfig::NOR_BLOCK_SIZE
 
uint32 FlashConfig::NOR_UNIFORM_SECTOR_SIZE
 
uint32 FlashConfig::NOR_SECTOR_SIZE
 
uint32 FlashConfig::NOR_SIZE
 
uint32 FlashConfig::NOR_NUM_4K_SECTORS
 
uint32 FlashConfig::NOR_NUM_SECTORS
 
uint32 FlashConfig::NOR_NUM_BLOCKS
 
uint32 FlashConfig::NOR_PAGE_SIZE
 
uint32 FlashConfig::NOR_NUM_PAGES_PER_SECTOR
 
uint32 FlashConfig::NOR_NUM_PAGES_PER_BLOCK
 
uint8 FlashConfig::NOR_ERASED_DATA
 
uint32 FlashConfig::NOR_4K_SECT_BOT_END_OFFSET
 
uint32 FlashConfig::NOR_BE_SECTOR_NUM
 
uint32 FlashConfig::NOR_CMD_BULK_ERASE
 
uint8 FlashConfig::NOR_CMD_WRREG
 
uint8 FlashConfig::NOR_CMD_WREN
 
uint32 FlashConfig::NOR_CMD_WRDIS
 
uint8 FlashConfig::NOR_CMD_RDSR
 
uint32 FlashConfig::NOR_CMD_RDSR2
 
uint8 FlashConfig::NOR_CMD_RDREG
 
uint32 FlashConfig::NOR_CMD_RDCR
 
uint8 FlashConfig::NOR_CMD_RDID
 
uint8 FlashConfig::NOR_CMD_SRSTE
 
uint8 FlashConfig::NOR_CMD_SFRST
 
uint8 FlashConfig::NOR_CMD_BLOCK_ERASE
 
uint8 FlashConfig::NOR_CMD_SECTOR_ERASE
 
uint32 FlashConfig::NOR_CMD_READ
 
uint32 FlashConfig::NOR_CMD_FAST_READ
 
uint32 FlashConfig::NOR_CMD_OCTAL_READ
 
uint32 FlashConfig::NOR_CMD_OCTAL_DDR_READ
 
uint32 FlashConfig::NOR_CMD_PAGE_PROG
 
uint32 FlashConfig::NOR_CMD_OCTAL_PROG
 
uint32 FlashConfig::NOR_CMD_WRITE_VCR
 
uint32 FlashConfig::NOR_CMD_READ_VCR
 
uint8 FlashConfig::NOR_VREG_OFFSET
 
uint32 FlashConfig::NOR_NVREG_OFFSET
 
uint32 FlashConfig::NOR_STS1_NVREG_ADDR
 
uint32 FlashConfig::NOR_STS2_NVREG_ADDR
 
uint32 FlashConfig::NOR_CFG1_NVREG_ADDR
 
uint32 FlashConfig::NOR_CFG2_NVREG_ADDR
 
uint32 FlashConfig::NOR_CFG3_NVREG_ADDR
 
uint32 FlashConfig::NOR_CFG4_NVREG_ADDR
 
uint32 FlashConfig::NOR_CFG5_NVREG_ADDR
 
uint32 FlashConfig::NOR_STS1_VREG_ADDR
 
uint32 FlashConfig::NOR_STS2_VREG_ADDR
 
uint32 FlashConfig::NOR_CFG1_VREG_ADDR
 
uint32 FlashConfig::NOR_CFG2_VREG_ADDR
 
uint32 FlashConfig::NOR_CFG3_VREG_ADDR
 
uint32 FlashConfig::NOR_CFG4_VREG_ADDR
 
uint32 FlashConfig::NOR_CFG5_VREG_ADDR
 
uint32 FlashConfig::NOR_RDID_NUM_BYTES
 
uint32 FlashConfig::NOR_MANF_ID
 
uint32 FlashConfig::NOR_DEVICE_ID
 
uint32 FlashConfig::NOR_SR_WIP
 
uint32 FlashConfig::NOR_SR_WRPGEN
 
uint32 FlashConfig::NOR_CR_TBPARM
 
uint32 FlashConfig::NOR_CMD_RDCR_VOL
 
uint32 FlashConfig::NOR_CMD_RDCR_NVOL
 
uint32 FlashConfig::NOR_CMD_OCTAL_O_FAST_RD
 
uint32 FlashConfig::NOR_CMD_OCTAL_IO_FAST_RD
 
uint32 FlashConfig::NOR_CMD_OCTAL_FAST_PROG
 
uint32 FlashConfig::NOR_CMD_EXT_OCTAL_FAST_PROG
 
uint32 FlashConfig::NOR_CMD_QUAD_O_FAST_RD
 
uint32 FlashConfig::NOR_CMD_QUAD_IO_FAST_RD
 
uint32 FlashConfig::NOR_CMD_QUAD_DDR_O_FAST_RD
 
uint32 FlashConfig::NOR_CMD_QUAD_FAST_PROG
 
uint32 FlashConfig::NOR_CMD_EXT_QUAD_FAST_PROG
 
uint32 FlashConfig::NOR_CMD_OCTAL_DDR_O_FAST_RD
 
uint32 FlashConfig::NOR_CMD_OCTAL_DDR_IO_FAST_RD
 
uint32 FlashConfig::NOR_CMD_READ_ENVCR
 
uint32 FlashConfig::NOR_CMD_WRITE_NVCR
 
uint32 FlashConfig::NOR_CMD_READ_NVCR
 
uint8 FlashConfig::NOR_CMD_WRITE_ENVCR
 
uint32 FlashConfig::NOR_SINGLE_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_SINGLE_CMD_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_OCTAL_SDR_CMD_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_OCTAL_DDR_CMD_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_LC
 
uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_INDAC
 
uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_LC_INDAC
 
uint32 FlashConfig::NOR_QUAD_READ_DUMMY_CYCLE
 
uint32 FlashConfig::NOR_CMD_QUAD_DDR_IO_READ
 
uint32 FlashConfig::NOR_CMD_QUAD_PAGE_PROG
 
uint32 FlashConfig::NOR_CMD_QUAD_READ
 
uint32 FlashConfig::NOR_RDID_CMD_LENGTH_SINGLE
 
uint32 FlashConfig::NOR_RDID_CMD_LENGTH_OCTAL
 
uint32 FlashConfig::NOR_PAGE_PROG_TIMEOUT
 
uint32 FlashConfig::NOR_SECTOR_ERASE_TIMEOUT
 
uint32 FlashConfig::NOR_WRR_WRITE_TIMEOUT
 
uint32 FlashConfig::NOR_BULK_ERASE_TIMEOUT
 
FlashConfig FlsNorDeviceConfig::flscfg [NOR_NUMBER_FLASH]
 

Macros

#define FLS_PRE_COMPILE_VARIANT   (STD_ON)
 FLS Build Variant. Build variants.(i.e Pre Compile,Post Build or Link time) 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

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...
 
enum  FLASH_Protocol { FLS_OSPI = 0U, FLS_XSPI = 1U, FLS_QSPI = 2U }
 
const FlsNorDeviceConfig FlsNorDevice
 
boolean xipEnable
 
 AUTOMATIC
 
FLS_CONFIG_DATA ConfigPtr
 
Fls_LengthType Length
 
const uint8 * SourceAddressPtr
 
uint8 * TargetAddressPtr
 
SPI_APPL_DATA RegRbPtr
 
 FUNC (void, FLS_CODE) Fls_SwitchMode(boolean dacEnable
 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...
 
 FUNC (Std_ReturnType, FLS_CODE) Fls_Erase(Fls_AddressType TargetAddress
 Erases flash sector(s). More...
 
 FUNC (MemIf_StatusType, FLS_CODE) Fls_GetStatus(void)
 Returns the driver state. More...
 
 FUNC (MemIf_JobResultType, FLS_CODE) Fls_GetJobResult(void)
 Returns the result of the last job. More...
 
 FUNC (Std_ReturnType, SPI_CODE) Ospi_RegisterReadback(P2VAR(CSL_ospi_flash_cfgRegs
 This function reads the important registers of the hardware unit and returns the value in the structure. More...
 

FLS Driver ISR category level

Defines for FLS Driver ISR ISR category level

const struct Fls_ConfigType_s FlsConfigSet
 FLS Configuration struct declaration. More...
 
#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...
 
#define FLS_INIT_CONFIG_PC   FlsConfigSet
 Pre Compile config macro name. More...
 
#define FLS_NOR
 FLS_MEMORY_TYPE. More...
 
#define FLS_BASE_ADDRESS   (1342177280U)
 Flash Memory start address, defines lower boundary for read/writ/erase/compare jobs. More...
 
#define FLS_BLANK_CHECK_API   (STD_ON)
 Enable/disable FLS Blank Check API. More...
 
#define FLS_COMPARE_API   (STD_ON)
 Enable/disable FLS compare API. More...
 
#define FLS_CANCEL_API   (STD_ON)
 Enable/disable FLS cancel API. More...
 
#define FLS_TIMEOUT_SUPERVISION_ENABLED   (STD_ON)
 Enable/disable FlsTimeoutSupervisionEnabled. More...
 
#define FLS_DEV_ERROR_DETECT   (STD_ON)
 Enable/disable FLS dev detect error. More...
 
#define FLS_DRIVER_INDEX   (0U)
 Index of driver, used by FEE. More...
 
#define FLS_GET_JOB_RESULT_API   (STD_ON)
 Enable/disable FLS Fls_GetJobResult function API. More...
 
#define FLS_GET_STATUS_API   (STD_ON)
 Enable/disable FLS Fls_GetStatus function API. More...
 
#define FLS_TOTAL_SIZE   (1073741824U)
 Total amount of flash memory in bytes. More...
 
#define FLS_USE_INTERRUPTS   (STD_OFF)
 Job processing triggered by hardware interrupt. More...
 
#define FLS_ISR_TYPE   (FLS_ISR_CAT1)
 ISR type. More...
 
#define FLS_TIMEOUT_DURATION   (50000U)
 Counter ID for counter used to count wait ticks. More...
 
#define FLS_VERSION_INFO_API   (STD_ON)
 Enable/disable FLS get version info API. More...
 
#define FLS_OS_COUNTER_ID   ((CounterType)OsCounter_0)
 Counter ID for counter used to count wait ticks. More...
 
#define FLS_OSPI_CTRL_BASE_ADDR   (1191444480U)
 Base Address of OSPI. More...
 
#define OSPI_REGISTER_READBACK_API   (STD_ON)
 Enable/disable OSPI register read back API. More...
 
#define OSPI_SAFETY_API   (STD_ON)
 Enable/disable OSPI safety API. More...
 
#define FLS_MAX_ERASE_TIME   (1000.0)
 Max Erase time in millisec. More...
 
#define FLS_MAX_WRITE_TIME   (1000.0)
 Max Write time in millisec. More...
 
#define FLS_NUMBER_OF_SECTOR_CFG   (2U)
 Number of Sectorlist configured. More...
 
#define NOR_NUMBER_FLASH   (3U)
 
#define FLS_ERASE_BUF_LEN   (262144U)
 
#define FLS_READ_WRITE_BUF_LEN   (768U)
 

Macro Definition Documentation

◆ FLS_PRE_COMPILE_VARIANT

#define FLS_PRE_COMPILE_VARIANT   (STD_ON)

FLS Build Variant. Build variants.(i.e Pre Compile,Post Build or Link time)

◆ FLS_ISR_VOID

#define FLS_ISR_VOID   (0x00U)

void ISR type

◆ FLS_ISR_CAT1

#define FLS_ISR_CAT1   (0x01U)

Category 1 ISR type.

◆ FLS_ISR_CAT2

#define FLS_ISR_CAT2   (0x02U)

Category 2 ISR type.

◆ FLS_INIT_CONFIG_PC

#define FLS_INIT_CONFIG_PC   FlsConfigSet

Pre Compile config macro name.

◆ FLS_NOR

#define FLS_NOR

FLS_MEMORY_TYPE.

◆ FLS_BASE_ADDRESS

#define FLS_BASE_ADDRESS   (1342177280U)

Flash Memory start address, defines lower boundary for read/writ/erase/compare jobs.

◆ FLS_BLANK_CHECK_API

#define FLS_BLANK_CHECK_API   (STD_ON)

Enable/disable FLS Blank Check API.

◆ FLS_COMPARE_API

#define FLS_COMPARE_API   (STD_ON)

Enable/disable FLS compare API.

◆ FLS_CANCEL_API

#define FLS_CANCEL_API   (STD_ON)

Enable/disable FLS cancel API.

◆ FLS_TIMEOUT_SUPERVISION_ENABLED

#define FLS_TIMEOUT_SUPERVISION_ENABLED   (STD_ON)

Enable/disable FlsTimeoutSupervisionEnabled.

◆ FLS_DEV_ERROR_DETECT

#define FLS_DEV_ERROR_DETECT   (STD_ON)

Enable/disable FLS dev detect error.

◆ FLS_DRIVER_INDEX

#define FLS_DRIVER_INDEX   (0U)

Index of driver, used by FEE.

◆ FLS_GET_JOB_RESULT_API

#define FLS_GET_JOB_RESULT_API   (STD_ON)

Enable/disable FLS Fls_GetJobResult function API.

◆ FLS_GET_STATUS_API

#define FLS_GET_STATUS_API   (STD_ON)

Enable/disable FLS Fls_GetStatus function API.

◆ FLS_TOTAL_SIZE

#define FLS_TOTAL_SIZE   (1073741824U)

Total amount of flash memory in bytes.

◆ FLS_USE_INTERRUPTS

#define FLS_USE_INTERRUPTS   (STD_OFF)

Job processing triggered by hardware interrupt.

◆ FLS_ISR_TYPE

#define FLS_ISR_TYPE   (FLS_ISR_CAT1)

ISR type.

◆ FLS_TIMEOUT_DURATION

#define FLS_TIMEOUT_DURATION   (50000U)

Counter ID for counter used to count wait ticks.

◆ FLS_VERSION_INFO_API

#define FLS_VERSION_INFO_API   (STD_ON)

Enable/disable FLS get version info API.

◆ FLS_OS_COUNTER_ID

#define FLS_OS_COUNTER_ID   ((CounterType)OsCounter_0)

Counter ID for counter used to count wait ticks.

◆ FLS_OSPI_CTRL_BASE_ADDR

#define FLS_OSPI_CTRL_BASE_ADDR   (1191444480U)

Base Address of OSPI.

◆ OSPI_REGISTER_READBACK_API

#define OSPI_REGISTER_READBACK_API   (STD_ON)

Enable/disable OSPI register read back API.

◆ OSPI_SAFETY_API

#define OSPI_SAFETY_API   (STD_ON)

Enable/disable OSPI safety API.

◆ FLS_MAX_ERASE_TIME

#define FLS_MAX_ERASE_TIME   (1000.0)

Max Erase time in millisec.

◆ FLS_MAX_WRITE_TIME

#define FLS_MAX_WRITE_TIME   (1000.0)

Max Write time in millisec.

◆ FLS_NUMBER_OF_SECTOR_CFG

#define FLS_NUMBER_OF_SECTOR_CFG   (2U)

Number of Sectorlist configured.

◆ NOR_NUMBER_FLASH

#define NOR_NUMBER_FLASH   (3U)

◆ FLS_ERASE_BUF_LEN

#define FLS_ERASE_BUF_LEN   (262144U)

◆ FLS_READ_WRITE_BUF_LEN

#define FLS_READ_WRITE_BUF_LEN   (768U)

Enumeration Type Documentation

◆ OSPI_xferLines

Number of lines used for OSPI read/write transaction.

Enumerator
OSPI_XFER_LINES_SINGLE 

Single line is used

OSPI_XFER_LINES_DUAL 

Two lines are used

OSPI_XFER_LINES_QUAD 

Four lines are used

OSPI_XFER_LINES_OCTAL 

Four lines are used

◆ FLASH_Protocol

Enumerator
FLS_OSPI 

Ospi is used

FLS_XSPI 

Xspi used

FLS_QSPI 

QSPI used

Function Documentation

◆ FUNC() [1/5]

FUNC ( void  ,
FLS_CODE   
)

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)

Cancels an ongoing job.

Performs the processing of jobs.

Initializes the Flash Driver.

*  Service name        : Fls_Init
*  Syntax              : void Fls_Init( const Fls_ConfigType* ConfigPtr )
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x00
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : ConfigPtr - Pointer to flash driver configuration set
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : Initializes the Flash Driver
*  
*  Service name        : Fls_MainFunction
*  Syntax              : void Fls_MainFunction(void)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x06
*  Description         : Performs the processing of jobs.
*  
*  Service name        : Fls_Cancel
*  Syntax              : void Fls_Cancel(void)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x03
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : None
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : Cancels an ongoing job.
*  

◆ FUNC() [2/5]

FUNC ( Std_ReturnType  ,
FLS_CODE   
)

Erases flash sector(s).

This service returns the version information of this module.

The function Fls_BlankCheck shall verify, whether a given memory area has been erased but not (yet) programmed.

Compares the contents of an area of flash memory with that of an application data buffer.

Reads from flash memory..

Writes one or more complete flash pages.

*  Service name        : Fls_Erase
*  Syntax              : Std_ReturnType Fls_Erase(Fls_AddressType TargetAddress
*                        ,Fls_LengthType Length)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x01
*  Sync/Async          : Asynchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : TargetAddress - Target address in flash memory.
*                        This address offset will be added to the flash memory
*                        base address.
*                        Length - Number of bytes to erase
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : Std_ReturnType -
*                        E_OK: erase command has been accepted
*                        E_NOT_OK: erase command has not been accepted
*  Description         : Erases flash sector(s).
*  
*  Service name        : Fls_Write
*  Syntax              : Std_ReturnType Fls_Write(Fls_AddressType TargetAddress
*                        ,const uint8* SourceAddressPtr,
*                        Fls_LengthType Length)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x02
*  Sync/Async          : Asynchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : TargetAddress - Target address in flash memory.
*                        This address offset will be added to the flash memory
*                        base address.
*                        SourceAddressPtr - Pointer to source data buffer
*                        Length - Number of bytes to erase
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : Std_ReturnType -
*                        E_OK: write command has been accepted
*                        E_NOT_OK: write command has not been accepted
*  Description         : Writes one or more complete flash pages.
*  
*  Service name        : Fls_Read
*  Syntax              : Std_ReturnType Fls_Read((Fls_AddressType SourceAddress
*                        ,const uint8* TargetAddressPtr,
*                        Fls_LengthType Length)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x07
*  Sync/Async          : Asynchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : SourceAddress - source address in flash memory.
*                        This address offset will be added to the flash memory
*                        base address.
*                        TargetAddressPtr - Pointer to source data buffer
*                        Length - Number of bytes to erase
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : Std_ReturnType -
*                        E_OK: read command has been accepted
*                        E_NOT_OK: read command has not been accepted
*  Description         : Reads from flash memory.
*  
*  Service name        : Fls_Compare
*  Syntax              : Std_ReturnType Fls_Compare
*                        (Fls_AddressType SourceAddress,
*                        const uint8* TargetAddressPtr,
*                        Fls_LengthType Length)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x08
*  Sync/Async          : Asynchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : SourceAddress - Target address in flash memory.
*                        This address offset will be added to the flash memory
*                        base address.
*                        TargetAddressPtr - Pointer to source data buffer
*                        Length - Number of bytes to erase
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : Std_ReturnType -
*                        E_OK: compare command has been accepted
*                        E_NOT_OK: compare command has not been accepted
*  Description         : Compares the contents of an area of flash memory
*                        with that of an application data buffer.
*  
*  Service name        : Fls_BlankCheck
*  Syntax              : Std_ReturnType Fls_Compare
*                        (Fls_AddressType TargetAddress,,
*                        Fls_LengthType Length)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x0a
*  Sync/Async          : Asynchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : TargetAddress - Target address in flash memory.
*                        This address offset will be added to the flash memory
*                        base address.
*                        SourceAddressPtr - Pointer to source data buffer
*                        Length - Number of bytes to erase
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : Std_ReturnType -
*                        E_OK: BlankCheck command has been accepted
*                        E_NOT_OK: BlankCheck command has not been accepted
*  Description         : The function Fls_BlankCheck shall verify,
*                        whether a given memory area has been
*                        erased but not (yet) programmed.
*  
*  Service name        : Fls_GetVersionInfo
*  Syntax              : void Fls_GetVersionInfo( Std_VersionInfoType*
*                                                                 versioninfo )
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x10
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : None
*  Parameters (inout)  : versioninfo - Pointer to where to store the version
*                        information of this module
*  Parameters (out)    : None
*  Return value        : None
*  Description         : This service returns the version information of this
*                        module
*  

◆ FUNC() [3/5]

FUNC ( MemIf_StatusType  ,
FLS_CODE   
)

Returns the driver state.

*  Service name        : Fls_GetStatus
*  Syntax              : MemIf_StatusType Fls_GetStatus( void )
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x04
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : None
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : MemIf_StatusType
*  Description         : Returns the driver state.
*  

◆ FUNC() [4/5]

FUNC ( MemIf_JobResultType  ,
FLS_CODE   
)

Returns the result of the last job.

*  Service name        : Fls_GetJobResult
*  Syntax              : MemIf_JobResultType Fls_GetJobResult(void)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x05
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : None
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : MemIf_JobResultType
*  Description         : Returns the result of the last job.
*  

◆ FUNC() [5/5]

FUNC ( Std_ReturnType  ,
SPI_CODE   
)

This function reads the important registers of the hardware unit and returns the value in the structure.

This API should be called after Ospi_Init is called. Otherwise this API will return E_NOT_OK.

This API could be used to readback the register contents after Ospi_Init and then the readback value could be compared during SPI execution to check the correctness of the HW unit. Since this API is used for this purpose, the register returned are the ones which doesn't change after init based on job or channel config.

*  Service name        : Ospi_RegisterReadback
*  Mode                : Supervisor Mode (Privileged Mode)
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (inout)  : RegRbPtr - Pointer to where to store the readback
*                        values. If this pointer is NULL_PTR, then the API
*                        will return E_NOT_OK.
*  Return value        : Std_ReturnType
*                        E_OK: Register read back has been done
*                        E_NOT_OK: Register read back failed
*  

Variable Documentation

◆ numberOfSectors

Fls_LengthType Fls_SectorType::numberOfSectors

Number of total Sectors in the Flash Device

◆ sectorPageSize

Fls_LengthType Fls_SectorType::sectorPageSize

Page size of the Flash Device

◆ sectorSize

Fls_LengthType Fls_SectorType::sectorSize

Size of each sector in the Flash Device

◆ sectorStartaddress

Fls_AddressType Fls_SectorType::sectorStartaddress

Start address of first sector of the Flash Device

◆ Fls_JobEndNotification

Fls_JobEndNotifyType Fls_ConfigType::Fls_JobEndNotification

Mapped to the job end notification routine provided by some upper layer module, typically the Fee module.

◆ Fls_JobErrorNotification

Fls_JobErrorNotifyType Fls_ConfigType::Fls_JobErrorNotification

Mapped to the job error notification routine provided by some upper layer module, typically the Fee module.

◆ maxReadNormalMode

uint32 Fls_ConfigType::maxReadNormalMode

The maximum number of bytes to read or compare in one cycle of the flash driver's job processing function in normal mode.

◆ maxWriteNormalMode

uint32 Fls_ConfigType::maxWriteNormalMode

The maximum number of bytes to write in one cycle of the flash driver's job processing function in normal mode.

◆ sectorList

Fls_SectorType Fls_ConfigType::sectorList[FLS_NUMBER_OF_SECTOR_CFG]

The maximum number of bytes to write in one cycle of the flash driver's job processing function in normal mode. Using Fls Info Structure instead of this for now.

◆ currentSectorIndex

uint32 Fls_ConfigType::currentSectorIndex

Index of the currently active sector configuration in the sector list. This field is updated during read/write/erase operations based on the address being accessed. It helps avoid repeated traversal of the sector list and aids in boundary validation, logging, and error handling.

◆ dacEnable

boolean Fls_ConfigType::dacEnable

Enable Direct Access Mode of Transfer in OSPI Flash

◆ xipEnable [1/2]

boolean Fls_ConfigType::xipEnable

Enable XIP mode in OSPI Flash

◆ ospiClkSpeed

uint64 Fls_ConfigType::ospiClkSpeed

OSPI Clock Speed

◆ dtrEnable

boolean Fls_ConfigType::dtrEnable

Enable Double transfer rate protocol for OSPI.

◆ phyEnable

boolean Fls_ConfigType::phyEnable

Enable PHY high-speed mode for DAC mode

◆ ospixferlines

OSPI_xferLines Fls_ConfigType::ospixferlines

Select the OSPI read/write transaction Lines

◆ flsBaudRateDiv

uint32 Fls_ConfigType::flsBaudRateDiv

To select the FLS baudrate Divider value

◆ blockSize

uint32 Fls_ConfigType::blockSize

To select OSPI block size based on variants

◆ FLS_PROTOCOL

FLASH_Protocol FlashConfig::FLS_PROTOCOL

◆ FOUR_BYTE_ADDR_ENABLE

uint32 FlashConfig::FOUR_BYTE_ADDR_ENABLE

◆ NOR_BLOCK_SIZE

uint32 FlashConfig::NOR_BLOCK_SIZE

◆ NOR_UNIFORM_SECTOR_SIZE

uint32 FlashConfig::NOR_UNIFORM_SECTOR_SIZE

◆ NOR_SECTOR_SIZE

uint32 FlashConfig::NOR_SECTOR_SIZE

◆ NOR_SIZE

uint32 FlashConfig::NOR_SIZE

◆ NOR_NUM_4K_SECTORS

uint32 FlashConfig::NOR_NUM_4K_SECTORS

◆ NOR_NUM_SECTORS

uint32 FlashConfig::NOR_NUM_SECTORS

◆ NOR_NUM_BLOCKS

uint32 FlashConfig::NOR_NUM_BLOCKS

◆ NOR_PAGE_SIZE

uint32 FlashConfig::NOR_PAGE_SIZE

◆ NOR_NUM_PAGES_PER_SECTOR

uint32 FlashConfig::NOR_NUM_PAGES_PER_SECTOR

◆ NOR_NUM_PAGES_PER_BLOCK

uint32 FlashConfig::NOR_NUM_PAGES_PER_BLOCK

◆ NOR_ERASED_DATA

uint8 FlashConfig::NOR_ERASED_DATA

◆ NOR_4K_SECT_BOT_END_OFFSET

uint32 FlashConfig::NOR_4K_SECT_BOT_END_OFFSET

◆ NOR_BE_SECTOR_NUM

uint32 FlashConfig::NOR_BE_SECTOR_NUM

◆ NOR_CMD_BULK_ERASE

uint32 FlashConfig::NOR_CMD_BULK_ERASE

◆ NOR_CMD_WRREG

uint8 FlashConfig::NOR_CMD_WRREG

◆ NOR_CMD_WREN

uint8 FlashConfig::NOR_CMD_WREN

◆ NOR_CMD_WRDIS

uint32 FlashConfig::NOR_CMD_WRDIS

◆ NOR_CMD_RDSR

uint8 FlashConfig::NOR_CMD_RDSR

◆ NOR_CMD_RDSR2

uint32 FlashConfig::NOR_CMD_RDSR2

◆ NOR_CMD_RDREG

uint8 FlashConfig::NOR_CMD_RDREG

◆ NOR_CMD_RDCR

uint32 FlashConfig::NOR_CMD_RDCR

◆ NOR_CMD_RDID

uint8 FlashConfig::NOR_CMD_RDID

◆ NOR_CMD_SRSTE

uint8 FlashConfig::NOR_CMD_SRSTE

◆ NOR_CMD_SFRST

uint8 FlashConfig::NOR_CMD_SFRST

◆ NOR_CMD_BLOCK_ERASE

uint8 FlashConfig::NOR_CMD_BLOCK_ERASE

◆ NOR_CMD_SECTOR_ERASE

uint8 FlashConfig::NOR_CMD_SECTOR_ERASE

◆ NOR_CMD_READ

uint32 FlashConfig::NOR_CMD_READ

◆ NOR_CMD_FAST_READ

uint32 FlashConfig::NOR_CMD_FAST_READ

◆ NOR_CMD_OCTAL_READ

uint32 FlashConfig::NOR_CMD_OCTAL_READ

◆ NOR_CMD_OCTAL_DDR_READ

uint32 FlashConfig::NOR_CMD_OCTAL_DDR_READ

◆ NOR_CMD_PAGE_PROG

uint32 FlashConfig::NOR_CMD_PAGE_PROG

◆ NOR_CMD_OCTAL_PROG

uint32 FlashConfig::NOR_CMD_OCTAL_PROG

◆ NOR_CMD_WRITE_VCR

uint32 FlashConfig::NOR_CMD_WRITE_VCR

◆ NOR_CMD_READ_VCR

uint32 FlashConfig::NOR_CMD_READ_VCR

◆ NOR_VREG_OFFSET

uint8 FlashConfig::NOR_VREG_OFFSET

◆ NOR_NVREG_OFFSET

uint32 FlashConfig::NOR_NVREG_OFFSET

◆ NOR_STS1_NVREG_ADDR

uint32 FlashConfig::NOR_STS1_NVREG_ADDR

◆ NOR_STS2_NVREG_ADDR

uint32 FlashConfig::NOR_STS2_NVREG_ADDR

◆ NOR_CFG1_NVREG_ADDR

uint32 FlashConfig::NOR_CFG1_NVREG_ADDR

◆ NOR_CFG2_NVREG_ADDR

uint32 FlashConfig::NOR_CFG2_NVREG_ADDR

◆ NOR_CFG3_NVREG_ADDR

uint32 FlashConfig::NOR_CFG3_NVREG_ADDR

◆ NOR_CFG4_NVREG_ADDR

uint32 FlashConfig::NOR_CFG4_NVREG_ADDR

◆ NOR_CFG5_NVREG_ADDR

uint32 FlashConfig::NOR_CFG5_NVREG_ADDR

◆ NOR_STS1_VREG_ADDR

uint32 FlashConfig::NOR_STS1_VREG_ADDR

◆ NOR_STS2_VREG_ADDR

uint32 FlashConfig::NOR_STS2_VREG_ADDR

◆ NOR_CFG1_VREG_ADDR

uint32 FlashConfig::NOR_CFG1_VREG_ADDR

◆ NOR_CFG2_VREG_ADDR

uint32 FlashConfig::NOR_CFG2_VREG_ADDR

◆ NOR_CFG3_VREG_ADDR

uint32 FlashConfig::NOR_CFG3_VREG_ADDR

◆ NOR_CFG4_VREG_ADDR

uint32 FlashConfig::NOR_CFG4_VREG_ADDR

◆ NOR_CFG5_VREG_ADDR

uint32 FlashConfig::NOR_CFG5_VREG_ADDR

◆ NOR_RDID_NUM_BYTES

uint32 FlashConfig::NOR_RDID_NUM_BYTES

◆ NOR_MANF_ID

uint32 FlashConfig::NOR_MANF_ID

Read ID command definitions

◆ NOR_DEVICE_ID

uint32 FlashConfig::NOR_DEVICE_ID

◆ NOR_SR_WIP

uint32 FlashConfig::NOR_SR_WIP

◆ NOR_SR_WRPGEN

uint32 FlashConfig::NOR_SR_WRPGEN

Status Register: Write-in-Progress bit

◆ NOR_CR_TBPARM

uint32 FlashConfig::NOR_CR_TBPARM

Status Register: Program enabled bit Configuration Register: TBPARM bit

◆ NOR_CMD_RDCR_VOL

uint32 FlashConfig::NOR_CMD_RDCR_VOL

◆ NOR_CMD_RDCR_NVOL

uint32 FlashConfig::NOR_CMD_RDCR_NVOL

◆ NOR_CMD_OCTAL_O_FAST_RD

uint32 FlashConfig::NOR_CMD_OCTAL_O_FAST_RD

◆ NOR_CMD_OCTAL_IO_FAST_RD

uint32 FlashConfig::NOR_CMD_OCTAL_IO_FAST_RD

◆ NOR_CMD_OCTAL_FAST_PROG

uint32 FlashConfig::NOR_CMD_OCTAL_FAST_PROG

◆ NOR_CMD_EXT_OCTAL_FAST_PROG

uint32 FlashConfig::NOR_CMD_EXT_OCTAL_FAST_PROG

◆ NOR_CMD_QUAD_O_FAST_RD

uint32 FlashConfig::NOR_CMD_QUAD_O_FAST_RD

◆ NOR_CMD_QUAD_IO_FAST_RD

uint32 FlashConfig::NOR_CMD_QUAD_IO_FAST_RD

◆ NOR_CMD_QUAD_DDR_O_FAST_RD

uint32 FlashConfig::NOR_CMD_QUAD_DDR_O_FAST_RD

◆ NOR_CMD_QUAD_FAST_PROG

uint32 FlashConfig::NOR_CMD_QUAD_FAST_PROG

◆ NOR_CMD_EXT_QUAD_FAST_PROG

uint32 FlashConfig::NOR_CMD_EXT_QUAD_FAST_PROG

◆ NOR_CMD_OCTAL_DDR_O_FAST_RD

uint32 FlashConfig::NOR_CMD_OCTAL_DDR_O_FAST_RD

◆ NOR_CMD_OCTAL_DDR_IO_FAST_RD

uint32 FlashConfig::NOR_CMD_OCTAL_DDR_IO_FAST_RD

◆ NOR_CMD_READ_ENVCR

uint32 FlashConfig::NOR_CMD_READ_ENVCR

◆ NOR_CMD_WRITE_NVCR

uint32 FlashConfig::NOR_CMD_WRITE_NVCR

◆ NOR_CMD_READ_NVCR

uint32 FlashConfig::NOR_CMD_READ_NVCR

◆ NOR_CMD_WRITE_ENVCR

uint8 FlashConfig::NOR_CMD_WRITE_ENVCR

◆ NOR_SINGLE_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_SINGLE_READ_DUMMY_CYCLE

Dummy cycles for various Read operations

◆ NOR_SINGLE_CMD_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_SINGLE_CMD_READ_DUMMY_CYCLE

◆ NOR_OCTAL_SDR_CMD_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_OCTAL_SDR_CMD_READ_DUMMY_CYCLE

◆ NOR_OCTAL_DDR_CMD_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_OCTAL_DDR_CMD_READ_DUMMY_CYCLE

◆ NOR_OCTAL_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE

◆ NOR_OCTAL_READ_DUMMY_CYCLE_LC

uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_LC

◆ NOR_OCTAL_READ_DUMMY_CYCLE_INDAC

uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_INDAC

◆ NOR_OCTAL_READ_DUMMY_CYCLE_LC_INDAC

uint32 FlashConfig::NOR_OCTAL_READ_DUMMY_CYCLE_LC_INDAC

◆ NOR_QUAD_READ_DUMMY_CYCLE

uint32 FlashConfig::NOR_QUAD_READ_DUMMY_CYCLE

◆ NOR_CMD_QUAD_DDR_IO_READ

uint32 FlashConfig::NOR_CMD_QUAD_DDR_IO_READ

◆ NOR_CMD_QUAD_PAGE_PROG

uint32 FlashConfig::NOR_CMD_QUAD_PAGE_PROG

◆ NOR_CMD_QUAD_READ

uint32 FlashConfig::NOR_CMD_QUAD_READ

◆ NOR_RDID_CMD_LENGTH_SINGLE

uint32 FlashConfig::NOR_RDID_CMD_LENGTH_SINGLE

Read ID Command Lengths

◆ NOR_RDID_CMD_LENGTH_OCTAL

uint32 FlashConfig::NOR_RDID_CMD_LENGTH_OCTAL

◆ NOR_PAGE_PROG_TIMEOUT

uint32 FlashConfig::NOR_PAGE_PROG_TIMEOUT

Timeouts (in microseconds)

◆ NOR_SECTOR_ERASE_TIMEOUT

uint32 FlashConfig::NOR_SECTOR_ERASE_TIMEOUT

◆ NOR_WRR_WRITE_TIMEOUT

uint32 FlashConfig::NOR_WRR_WRITE_TIMEOUT

◆ NOR_BULK_ERASE_TIMEOUT

uint32 FlashConfig::NOR_BULK_ERASE_TIMEOUT

◆ flscfg

FlashConfig FlsNorDeviceConfig::flscfg[NOR_NUMBER_FLASH]

◆ FlsNorDevice

const FlsNorDeviceConfig FlsNorDevice
extern

◆ xipEnable [2/2]

boolean xipEnable

◆ AUTOMATIC

AUTOMATIC

◆ ConfigPtr

FLS_CONFIG_DATA ConfigPtr

◆ Length

◆ SourceAddressPtr

const uint8* SourceAddressPtr

◆ TargetAddressPtr

const uint8 * TargetAddressPtr

◆ RegRbPtr

SPI_APPL_DATA RegRbPtr

◆ FlsConfigSet

const struct Fls_ConfigType_s FlsConfigSet
extern

FLS Configuration struct declaration.