rusEFI
The most advanced open source ECU
|
Data Structures | |
struct | _ftfx_swap_state_config |
Flash Swap information. More... | |
struct | _ftfx_special_mem |
ftfx special memory access information. More... | |
struct | _ftfx_mem_descriptor |
Flash memory descriptor. More... | |
struct | _ftfx_ops_config |
Active FTFx information for the current operation. More... | |
struct | _ftfx_ifr_descriptor |
Flash IFR memory descriptor. More... | |
struct | _ftfx_config |
Flash driver state information. More... | |
Functions | |
Initialization | |
status_t | FTFx_API_Init (ftfx_config_t *config) |
Initializes the global flash properties structure members. | |
status_t | FTFx_API_UpdateFlexnvmPartitionStatus (ftfx_config_t *config) |
Updates FlexNVM memory partition status according to data flash 0 IFR. | |
Erasing | |
status_t | FTFx_CMD_Erase (ftfx_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key) |
Erases the flash sectors encompassed by parameters passed into function. | |
status_t | FTFx_CMD_EraseAll (ftfx_config_t *config, uint32_t key) |
Erases entire flash. | |
status_t | FTFx_CMD_EraseAllUnsecure (ftfx_config_t *config, uint32_t key) |
Erases the entire flash, including protected sectors. | |
status_t | FTFx_CMD_EraseAllExecuteOnlySegments (ftfx_config_t *config, uint32_t key) |
Erases all program flash execute-only segments defined by the FXACC registers. | |
Programming | |
status_t | FTFx_CMD_Program (ftfx_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes) |
Programs flash with data at locations passed in through parameters. | |
status_t | FTFx_CMD_ProgramOnce (ftfx_config_t *config, uint32_t index, uint8_t *src, uint32_t lengthInBytes) |
Programs Program Once Field through parameters. | |
status_t | FTFx_CMD_ProgramSection (ftfx_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes) |
Programs flash with data at locations passed in through parameters via the Program Section command. | |
status_t | FTFx_CMD_ProgramPartition (ftfx_config_t *config, ftfx_partition_flexram_load_opt_t option, uint32_t eepromDataSizeCode, uint32_t flexnvmPartitionCode) |
Prepares the FlexNVM block for use as data flash, EEPROM backup, or a combination of both and initializes the FlexRAM. | |
Reading | |
status_t | FTFx_CMD_ReadOnce (ftfx_config_t *config, uint32_t index, uint8_t *dst, uint32_t lengthInBytes) |
Reads the Program Once Field through parameters. | |
status_t | FTFx_CMD_ReadResource (ftfx_config_t *config, uint32_t start, uint8_t *dst, uint32_t lengthInBytes, ftfx_read_resource_opt_t option) |
Reads the resource with data at locations passed in through parameters. | |
Verification | |
status_t | FTFx_CMD_VerifyErase (ftfx_config_t *config, uint32_t start, uint32_t lengthInBytes, ftfx_margin_value_t margin) |
Verifies an erasure of the desired flash area at a specified margin level. | |
status_t | FTFx_CMD_VerifyEraseAll (ftfx_config_t *config, ftfx_margin_value_t margin) |
Verifies erasure of the entire flash at a specified margin level. | |
status_t | FTFx_CMD_VerifyEraseAllExecuteOnlySegments (ftfx_config_t *config, ftfx_margin_value_t margin) |
Verifies whether the program flash execute-only segments have been erased to the specified read margin level. | |
status_t | FTFx_CMD_VerifyProgram (ftfx_config_t *config, uint32_t start, uint32_t lengthInBytes, const uint8_t *expectedData, ftfx_margin_value_t margin, uint32_t *failedAddress, uint32_t *failedData) |
Verifies programming of the desired flash area at a specified margin level. | |
Security | |
status_t | FTFx_REG_GetSecurityState (ftfx_config_t *config, ftfx_security_state_t *state) |
Returns the security state via the pointer passed into the function. | |
status_t | FTFx_CMD_SecurityBypass (ftfx_config_t *config, const uint8_t *backdoorKey) |
Allows users to bypass security with a backdoor key. | |
FlexRAM | |
status_t | FTFx_CMD_SetFlexramFunction (ftfx_config_t *config, ftfx_flexram_func_opt_t option) |
Sets the FlexRAM function command. | |
Swap | |
status_t | FTFx_CMD_SwapControl (ftfx_config_t *config, uint32_t address, ftfx_swap_control_opt_t option, ftfx_swap_state_config_t *returnInfo) |
Configures the Swap function or checks the swap state of the Flash module. | |
typedef struct _ftfx_config ftfx_config_t |
Flash driver state information.
An instance of this structure is allocated by the user of the flash driver and passed into each of the driver APIs.
typedef enum _ftfx_flexram_function_option ftfx_flexram_func_opt_t |
Enumeration for the two possilbe options of set FlexRAM function command.
typedef struct _ftfx_ifr_descriptor ftfx_ifr_desc_t |
Flash IFR memory descriptor.
typedef enum _ftfx_margin_value ftfx_margin_value_t |
Enumeration for supported FTFx margin levels.
typedef struct _ftfx_mem_descriptor ftfx_mem_desc_t |
Flash memory descriptor.
typedef struct _ftfx_ops_config ftfx_ops_config_t |
Active FTFx information for the current operation.
Enumeration for the FlexRAM load during reset option.
typedef enum _ftfx_read_resource_opt ftfx_read_resource_opt_t |
Enumeration for the two possible options of flash read resource command.
typedef enum _ftfx_security_state ftfx_security_state_t |
Enumeration for the three possible FTFx security states.
typedef struct _ftfx_special_mem ftfx_spec_mem_t |
ftfx special memory access information.
typedef enum _ftfx_swap_block_status ftfx_swap_block_status_t |
@breif Enumeration for the possible flash Swap block status
typedef enum _ftfx_swap_control_option ftfx_swap_control_opt_t |
Enumeration for the possible options of Swap control commands.
typedef struct _ftfx_swap_state_config ftfx_swap_state_config_t |
Flash Swap information.
typedef enum _ftfx_swap_state ftfx_swap_state_t |
Enumeration for the possible flash Swap status.
Enumeration for FTFx driver API keys.
Enumerator | |
---|---|
kFTFx_ApiEraseKey | Key value used to validate all FTFx erase APIs. |
Definition at line 125 of file fsl_ftfx_controller.h.
Enumeration for the two possilbe options of set FlexRAM function command.
Enumerator | |
---|---|
kFTFx_FlexramFuncOptAvailableAsRam | An option used to make FlexRAM available as RAM |
kFTFx_FlexramFuncOptAvailableForEeprom | An option used to make FlexRAM available for EEPROM |
Definition at line 175 of file fsl_ftfx_controller.h.
enum _ftfx_margin_value |
Enumeration for supported FTFx margin levels.
Definition at line 154 of file fsl_ftfx_controller.h.
enum _ftfx_memory_type |
Enumeration for FTFx memory type.
Enumerator | |
---|---|
kFTFx_MemTypePflash | |
kFTFx_MemTypeFlexnvm |
Definition at line 230 of file fsl_ftfx_controller.h.
Enumeration for the FlexRAM load during reset option.
Definition at line 134 of file fsl_ftfx_controller.h.
Enumeration for the two possible options of flash read resource command.
Enumerator | |
---|---|
kFTFx_ResourceOptionFlashIfr | Select code for Program flash 0 IFR, Program flash swap 0 IFR, Data flash 0 IFR |
kFTFx_ResourceOptionVersionId | Select code for the version ID |
Definition at line 144 of file fsl_ftfx_controller.h.
enum _ftfx_security_state |
Enumeration for the three possible FTFx security states.
Enumerator | |
---|---|
kFTFx_SecurityStateNotSecure | Flash is not secure. |
kFTFx_SecurityStateBackdoorEnabled | Flash backdoor is enabled. |
kFTFx_SecurityStateBackdoorDisabled | Flash backdoor is disabled. |
Definition at line 165 of file fsl_ftfx_controller.h.
enum _ftfx_status |
FTFx driver status codes.
Definition at line 72 of file fsl_ftfx_controller.h.
@breif Enumeration for the possible flash Swap block status
Definition at line 209 of file fsl_ftfx_controller.h.
Enumeration for the possible options of Swap control commands.
Definition at line 184 of file fsl_ftfx_controller.h.
enum _ftfx_swap_state |
Enumeration for the possible flash Swap status.
Definition at line 196 of file fsl_ftfx_controller.h.
status_t FTFx_API_Init | ( | ftfx_config_t * | config | ) |
Initializes the global flash properties structure members.
This function checks and initializes the Flash module for the other Flash APIs.
config | Pointer to the storage for the driver runtime state. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
Definition at line 240 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_Init().
status_t FTFx_API_UpdateFlexnvmPartitionStatus | ( | ftfx_config_t * | config | ) |
Updates FlexNVM memory partition status according to data flash 0 IFR.
This function updates FlexNVM memory partition status.
config | Pointer to the storage for the driver runtime state. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_PartitionStatusUpdateFailure | Failed to update the partition status. |
Definition at line 269 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_Init(), FTFx_CMD_EraseAll(), and FTFx_CMD_EraseAllUnsecure().
status_t FTFx_CMD_Erase | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint32_t | lengthInBytes, | ||
uint32_t | key | ||
) |
Erases the flash sectors encompassed by parameters passed into function.
This function erases the appropriate number of flash sectors based on the desired start address and length.
config | The pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be erased. The start address does not need to be sector-aligned but must be word-aligned. |
lengthInBytes | The length, given in bytes (not words or long-words) to be erased. Must be word-aligned. |
key | The value used to validate all flash erase APIs. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | The parameter is not aligned with the specified baseline. |
kStatus_FTFx_AddressError | The address is out of range. |
kStatus_FTFx_EraseKeyError | The API erase key is invalid. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 312 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_DflashErase().
status_t FTFx_CMD_EraseAll | ( | ftfx_config_t * | config, |
uint32_t | key | ||
) |
Erases entire flash.
config | Pointer to the storage for the driver runtime state. |
key | A value used to validate all flash erase APIs. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_EraseKeyError | API erase key is invalid. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during command execution. |
kStatus_FTFx_PartitionStatusUpdateFailure | Failed to update the partition status. |
Definition at line 375 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_EraseAll().
status_t FTFx_CMD_EraseAllExecuteOnlySegments | ( | ftfx_config_t * | config, |
uint32_t | key | ||
) |
Erases all program flash execute-only segments defined by the FXACC registers.
config | Pointer to the storage for the driver runtime state. |
key | A value used to validate all flash erase APIs. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_EraseKeyError | API erase key is invalid. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 445 of file fsl_ftfx_controller.c.
status_t FTFx_CMD_EraseAllUnsecure | ( | ftfx_config_t * | config, |
uint32_t | key | ||
) |
Erases the entire flash, including protected sectors.
config | Pointer to the storage for the driver runtime state. |
key | A value used to validate all flash erase APIs. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_EraseKeyError | API erase key is invalid. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during command execution. |
kStatus_FTFx_PartitionStatusUpdateFailure | Failed to update the partition status. |
Definition at line 410 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_EraseAllUnsecure().
status_t FTFx_CMD_Program | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint8_t * | src, | ||
uint32_t | lengthInBytes | ||
) |
Programs flash with data at locations passed in through parameters.
This function programs the flash memory with the desired data for a given flash area as determined by the start address and the length.
config | A pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be programmed. Must be word-aligned. |
src | A pointer to the source buffer of data that is to be programmed into the flash. |
lengthInBytes | The length, given in bytes (not words or long-words), to be programmed. Must be word-aligned. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with the specified baseline. |
kStatus_FTFx_AddressError | Address is out of range. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 471 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_DflashProgram().
status_t FTFx_CMD_ProgramOnce | ( | ftfx_config_t * | config, |
uint32_t | index, | ||
uint8_t * | src, | ||
uint32_t | lengthInBytes | ||
) |
Programs Program Once Field through parameters.
This function programs the Program Once Field with the desired data for a given flash area as determined by the index and length.
config | A pointer to the storage for the driver runtime state. |
index | The index indicating which area of the Program Once Field to be programmed. |
src | A pointer to the source buffer of data that is to be programmed into the Program Once Field. |
lengthInBytes | The length, given in bytes (not words or long-words), to be programmed. Must be word-aligned. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 534 of file fsl_ftfx_controller.c.
status_t FTFx_CMD_ProgramPartition | ( | ftfx_config_t * | config, |
ftfx_partition_flexram_load_opt_t | option, | ||
uint32_t | eepromDataSizeCode, | ||
uint32_t | flexnvmPartitionCode | ||
) |
Prepares the FlexNVM block for use as data flash, EEPROM backup, or a combination of both and initializes the FlexRAM.
config | Pointer to storage for the driver runtime state. |
option | The option used to set FlexRAM load behavior during reset. |
eepromDataSizeCode | Determines the amount of FlexRAM used in each of the available EEPROM subsystems. |
flexnvmPartitionCode | Specifies how to split the FlexNVM block between data flash memory and EEPROM backup memory supporting EEPROM functions. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | Invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during command execution. |
Definition at line 695 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_ProgramPartition().
status_t FTFx_CMD_ProgramSection | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint8_t * | src, | ||
uint32_t | lengthInBytes | ||
) |
Programs flash with data at locations passed in through parameters via the Program Section command.
This function programs the flash memory with the desired data for a given flash area as determined by the start address and length.
config | A pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be programmed. Must be word-aligned. |
src | A pointer to the source buffer of data that is to be programmed into the flash. |
lengthInBytes | The length, given in bytes (not words or long-words), to be programmed. Must be word-aligned. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with specified baseline. |
kStatus_FTFx_AddressError | Address is out of range. |
kStatus_FTFx_SetFlexramAsRamError | Failed to set flexram as RAM. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during command execution. |
kStatus_FTFx_RecoverFlexramAsEepromError | Failed to recover FlexRAM as EEPROM. |
Definition at line 574 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_DflashProgramSection().
status_t FTFx_CMD_ReadOnce | ( | ftfx_config_t * | config, |
uint32_t | index, | ||
uint8_t * | dst, | ||
uint32_t | lengthInBytes | ||
) |
Reads the Program Once Field through parameters.
This function reads the read once feild with given index and length.
config | A pointer to the storage for the driver runtime state. |
index | The index indicating the area of program once field to be read. |
dst | A pointer to the destination buffer of data that is used to store data to be read. |
lengthInBytes | The length, given in bytes (not words or long-words), to be programmed. Must be word-aligned. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 730 of file fsl_ftfx_controller.c.
status_t FTFx_CMD_ReadResource | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint8_t * | dst, | ||
uint32_t | lengthInBytes, | ||
ftfx_read_resource_opt_t | option | ||
) |
Reads the resource with data at locations passed in through parameters.
This function reads the flash memory with the desired location for a given flash area as determined by the start address and length.
config | A pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be programmed. Must be word-aligned. |
dst | A pointer to the destination buffer of data that is used to store data to be read. |
lengthInBytes | The length, given in bytes (not words or long-words), to be read. Must be word-aligned. |
option | The resource option which indicates which area should be read back. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with the specified baseline. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 772 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_ReadResource(), and FTFx_API_UpdateFlexnvmPartitionStatus().
status_t FTFx_CMD_SecurityBypass | ( | ftfx_config_t * | config, |
const uint8_t * | backdoorKey | ||
) |
Allows users to bypass security with a backdoor key.
If the MCU is in secured state, this function unsecures the MCU by comparing the provided backdoor key with ones in the flash configuration field.
config | A pointer to the storage for the driver runtime state. |
backdoorKey | A pointer to the user buffer containing the backdoor key. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 978 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_SecurityBypass().
status_t FTFx_CMD_SetFlexramFunction | ( | ftfx_config_t * | config, |
ftfx_flexram_func_opt_t | option | ||
) |
Sets the FlexRAM function command.
config | A pointer to the storage for the driver runtime state. |
option | The option used to set the work mode of FlexRAM. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 1049 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_EepromWrite(), FLEXNVM_SetFlexramFunction(), and FTFx_CMD_ProgramSection().
status_t FTFx_CMD_SwapControl | ( | ftfx_config_t * | config, |
uint32_t | address, | ||
ftfx_swap_control_opt_t | option, | ||
ftfx_swap_state_config_t * | returnInfo | ||
) |
Configures the Swap function or checks the swap state of the Flash module.
config | A pointer to the storage for the driver runtime state. |
address | Address used to configure the flash Swap function. |
option | The possible option used to configure Flash Swap function or check the flash Swap status |
returnInfo | A pointer to the data which is used to return the information of flash Swap. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with specified baseline. |
kStatus_FTFx_SwapIndicatorAddressError | Swap indicator address is invalid. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 1073 of file fsl_ftfx_controller.c.
status_t FTFx_CMD_VerifyErase | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint32_t | lengthInBytes, | ||
ftfx_margin_value_t | margin | ||
) |
Verifies an erasure of the desired flash area at a specified margin level.
This function checks the appropriate number of flash sectors based on the desired start address and length to check whether the flash is erased to the specified read margin level.
config | A pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be verified. The start address does not need to be sector-aligned but must be word-aligned. |
lengthInBytes | The length, given in bytes (not words or long-words), to be verified. Must be word-aligned. |
margin | Read margin choice. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with specified baseline. |
kStatus_FTFx_AddressError | Address is out of range. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 836 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_DflashVerifyErase().
status_t FTFx_CMD_VerifyEraseAll | ( | ftfx_config_t * | config, |
ftfx_margin_value_t | margin | ||
) |
Verifies erasure of the entire flash at a specified margin level.
This function checks whether the flash is erased to the specified read margin level.
config | A pointer to the storage for the driver runtime state. |
margin | Read margin choice. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 895 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_VerifyEraseAll().
status_t FTFx_CMD_VerifyEraseAllExecuteOnlySegments | ( | ftfx_config_t * | config, |
ftfx_margin_value_t | margin | ||
) |
Verifies whether the program flash execute-only segments have been erased to the specified read margin level.
config | A pointer to the storage for the driver runtime state. |
margin | Read margin choice. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 909 of file fsl_ftfx_controller.c.
status_t FTFx_CMD_VerifyProgram | ( | ftfx_config_t * | config, |
uint32_t | start, | ||
uint32_t | lengthInBytes, | ||
const uint8_t * | expectedData, | ||
ftfx_margin_value_t | margin, | ||
uint32_t * | failedAddress, | ||
uint32_t * | failedData | ||
) |
Verifies programming of the desired flash area at a specified margin level.
This function verifies the data programed in the flash memory using the Flash Program Check Command and compares it to the expected data for a given flash area as determined by the start address and length.
config | A pointer to the storage for the driver runtime state. |
start | The start address of the desired flash memory to be verified. Must be word-aligned. |
lengthInBytes | The length, given in bytes (not words or long-words), to be verified. Must be word-aligned. |
expectedData | A pointer to the expected data that is to be verified against. |
margin | Read margin choice. |
failedAddress | A pointer to the returned failing address. |
failedData | A pointer to the returned failing data. Some derivatives do not include failed data as part of the FCCOBx registers. In this case, zeros are returned upon failure. |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
kStatus_FTFx_AlignmentError | Parameter is not aligned with specified baseline. |
kStatus_FTFx_AddressError | Address is out of range. |
kStatus_FTFx_ExecuteInRamFunctionNotReady | Execute-in-RAM function is not available. |
kStatus_FTFx_AccessError | Invalid instruction codes and out-of bounds addresses. |
kStatus_FTFx_ProtectionViolation | The program/erase operation is requested to execute on protected areas. |
kStatus_FTFx_CommandFailure | Run-time error during the command execution. |
Definition at line 923 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_DflashVerifyProgram().
status_t FTFx_REG_GetSecurityState | ( | ftfx_config_t * | config, |
ftfx_security_state_t * | state | ||
) |
Returns the security state via the pointer passed into the function.
This function retrieves the current flash security status, including the security enabling state and the backdoor key enabling state.
config | A pointer to storage for the driver runtime state. |
state | A pointer to the value returned for the current security status code: |
kStatus_FTFx_Success | API was executed successfully. |
kStatus_FTFx_InvalidArgument | An invalid argument is provided. |
Definition at line 1010 of file fsl_ftfx_controller.c.
Referenced by FLEXNVM_GetSecurityState().