MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
The flash provides the C40ESP3 Flash driver of Kinetis devices with the C40ESP3 Flash module inside. The flash driver provides general APIs to handle specific operations on C40ESP3 Flash module. The user can use those APIs directly in the application. In addition, it provides internal functions called by the driver. Although these functions are not meant to be called from the user's application directly, the APIs can still be used.
Data Structures | |
struct | flash_mem_desc_t |
Flash memory descriptor. More... | |
struct | flash_config_t |
Flash driver state information. More... | |
Flash API key | |
enum | _flash_driver_api_keys { kFLASH_ApiEraseKey = FOUR_CHAR_CODE('l', 'f', 'e', 'k'), kFLASH_ApiEraseKey = FOUR_CHAR_CODE('l', 'f', 'e', 'k') } |
Enumeration for Flash driver API keys. More... | |
Initialization | |
status_t | FLASH_Init (flash_config_t *config) |
Initializes the global flash properties structure members. More... | |
Erasing | |
status_t | FLASH_Erase (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes, uint32_t key) |
Erases the flash sectors encompassed by parameters passed into function. | |
status_t | FLASH_EraseAll (FMU_Type *base, uint32_t key) |
Erases entire flash and ifr. | |
Programming | |
status_t | FLASH_Program (flash_config_t *config, FMU_Type *base, uint32_t start, uint8_t *src, uint32_t lengthInBytes) |
Programs flash phrases with data at locations passed in through parameters. | |
status_t | FLASH_ProgramPage (flash_config_t *config, FMU_Type *base, uint32_t start, uint8_t *src, uint32_t lengthInBytes) |
Programs flash pages with data at locations passed in through parameters. | |
Verification | |
status_t | FLASH_VerifyErasePhrase (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the flash phrases are erased. | |
status_t | FLASH_VerifyErasePage (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the flash pages are erased. | |
status_t | FLASH_VerifyEraseSector (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the flash sectors are erased. | |
status_t | FLASH_VerifyEraseAll (FMU_Type *base) |
Verify that all flash and IFR space is erased. | |
status_t | FLASH_VerifyEraseBlock (flash_config_t *config, FMU_Type *base, uint32_t blockaddr) |
Verify that a flash block is erased. | |
status_t | FLASH_VerifyEraseIFRPhrase (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the ifr phrases are erased. | |
status_t | FLASH_VerifyEraseIFRPage (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the ifr pages are erased. | |
status_t | FLASH_VerifyEraseIFRSector (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t lengthInBytes) |
Verify that the ifr sectors are erased. | |
Properties | |
status_t | FLASH_GetProperty (flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value) |
Returns the desired flash property. | |
Read (Main Array or IFR) Into MISR | |
status_t | Read_Into_MISR (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t ending, uint32_t *seed, uint32_t *signature) |
Read into MISR. More... | |
status_t | Read_IFR_Into_MISR (flash_config_t *config, FMU_Type *base, uint32_t start, uint32_t ending, uint32_t *seed, uint32_t *signature) |
Read IFR into MISR. More... | |
struct flash_mem_desc_t |
Data Fields | |
uint32_t | blockBase |
A base address of the flash block. More... | |
uint32_t | totalSize |
The size of the flash block. More... | |
uint32_t | blockCount |
A number of flash blocks. More... | |
uint32_t flash_mem_desc_t::blockBase |
Base address of the flash block.
uint32_t flash_mem_desc_t::totalSize |
uint32_t flash_mem_desc_t::blockCount |
struct flash_config_t |
An instance of this structure is allocated by the user of the flash driver and passed into each of the driver APIs.
#define FSL_FLASH_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
Version 2.1.1.
enum flash_property_tag_t |
Enumerator | |
---|---|
kFLASH_ApiEraseKey |
Key value used to validate all flash erase APIs. |
kFLASH_ApiEraseKey |
Key value used to validate all flash erase APIs. |
status_t FLASH_Init | ( | flash_config_t * | config | ) |
This function checks and initializes the Flash module for the other Flash APIs.
config | Pointer to the storage for the driver runtime state. |
kStatus_FLASH_Success | API was executed successfully. |
kStatus_FLASH_InvalidArgument | An invalid argument is provided. |
kStatus_FLASH_CommandFailure | Run-time error during the command execution. |
kStatus_FLASH_CommandNotSupported | Flash API is not supported. |
status_t Read_Into_MISR | ( | flash_config_t * | config, |
FMU_Type * | base, | ||
uint32_t | start, | ||
uint32_t | ending, | ||
uint32_t * | seed, | ||
uint32_t * | signature | ||
) |
The Read into MISR operation generates a signature based on the contents of the selected flash memory using an embedded MISR.
status_t Read_IFR_Into_MISR | ( | flash_config_t * | config, |
FMU_Type * | base, | ||
uint32_t | start, | ||
uint32_t | ending, | ||
uint32_t * | seed, | ||
uint32_t * | signature | ||
) |
The Read IFR into MISR operation generates a signature based on the contents of the selected IFR space using an embedded MISR.