MCUSW
Loading...
Searching...
No Matches
FLS Configuration

Introduction

This files defines FLS MCAL configuration structures

Data Structures

struct  Fls_ConfigType
 FLS Module Configuration Structure. More...
 

Variables

Fls_JobEndNotifyType Fls_ConfigType::Fls_JobEndNotification
 
Fls_JobErrorNotifyType Fls_ConfigType::Fls_JobErrorNotification
 
uint32 Fls_ConfigType::maxReadNormalMode
 
uint32 Fls_ConfigType::maxWriteNormalMode
 
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
 

Macros

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

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...
 
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)
 
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.
 
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.
 
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.
 
MemIf_StatusType Fls_GetStatus (void)
 Returns the driver state.
 
Std_ReturnType Fls_GetVersionInfo (Std_VersionInfoType *versioninfo)
 This service returns the version information of this module.
 
MemIf_JobResultType Fls_GetJobResult (void)
 Returns the result of the last job.
 
void Fls_MainFunction (void)
 Performs the processing of jobs.
 
void Fls_Cancel (void)
 Cancels an ongoing job.
 

FLS Driver ISR category level

Defines for FLS Driver ISR ISR category level

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

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_OSPI

#define FLS_OSPI

FLS_PROTOCOL_MODE.

◆ 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_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_TIMEOUT_DURATION

#define FLS_TIMEOUT_DURATION   (50000)

Counter ID for counter used to count wait ticks.

◆ FLS_OSPI_CTRL_BASE_ADDR

#define FLS_OSPI_CTRL_BASE_ADDR   (1191444480UL)

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.

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

Function Documentation

◆ Fls_SwitchMode()

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)

◆ Fls_Init()

void Fls_Init ( const Fls_ConfigType * ConfigPtr)

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
*  

◆ Fls_Erase()

Std_ReturnType Fls_Erase ( Fls_AddressType TargetAddress,
Fls_LengthType Length )

Erases flash sector(s).

*  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).
*  

◆ Fls_Write()

Std_ReturnType Fls_Write ( Fls_AddressType TargetAddress,
const uint8 * SourceAddressPtr,
Fls_LengthType Length )

Writes one or more complete flash pages.

*  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.
*  

◆ Fls_Read()

Std_ReturnType Fls_Read ( Fls_AddressType SourceAddress,
uint8 * TargetAddressPtr,
Fls_LengthType Length )

Reads from flash memory..

*  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.
*  

◆ Fls_Compare()

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.

*  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.
*  

◆ Fls_BlankCheck()

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.

*  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.
*  

◆ Fls_GetStatus()

MemIf_StatusType Fls_GetStatus ( void )

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.
*  

◆ Fls_GetVersionInfo()

Std_ReturnType Fls_GetVersionInfo ( Std_VersionInfoType * versioninfo)

This service returns the version information of this module.

*  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
*  

◆ Fls_GetJobResult()

MemIf_JobResultType Fls_GetJobResult ( void )

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.
*  

◆ Fls_MainFunction()

void Fls_MainFunction ( void )

Performs the processing of jobs.

*  Service name        : Fls_MainFunction
*  Syntax              : void Fls_MainFunction(void)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x06
*  Description         : Performs the processing of jobs.
*  

◆ Fls_Cancel()

void Fls_Cancel ( void )

Cancels an ongoing job.

*  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.
*  

Variable Documentation

◆ 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.

◆ dacEnable

boolean Fls_ConfigType::dacEnable

Enable Direct Access Mode of Transfer in OSPI Flash

◆ xipEnable

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

◆ FlsConfigSet

const struct Fls_ConfigType_s FlsConfigSet
extern

FLS Configuration struct declaration.