![]() |
S32 SDK
|
This section describes the programming interface of the Flash Peripheral Driver.
Data Structures | |
struct | flash_user_config_t |
Flash User Configuration Structure. More... | |
struct | flash_ssd_config_t |
Flash SSD Configuration Structure. More... | |
struct | flash_eeprom_status_t |
EEPROM status structure. More... | |
Typedefs | |
typedef void(* | flash_callback_t) (void) |
Call back function pointer data type. More... | |
Enumerations | |
enum | flash_flexRam_function_control_code_t { EEE_ENABLE = 0x00U, EEE_QUICK_WRITE = 0x55U, EEE_STATUS_QUERY = 0x77U, EEE_COMPLETE_INTERRUPT_QUICK_WRITE = 0xAAU, EEE_DISABLE = 0xFFU } |
FlexRAM Function control Code. More... | |
Variables | |
uint32_t | PFlashBase |
uint32_t | PFlashSize |
uint32_t | DFlashBase |
uint32_t | EERAMBase |
flash_callback_t | CallBack |
uint32_t | PFlashBase |
uint32_t | PFlashSize |
uint32_t | DFlashBase |
uint32_t | DFlashSize |
uint32_t | EERAMBase |
uint32_t | EEESize |
flash_callback_t | CallBack |
uint8_t | brownOutCode |
uint16_t | numOfRecordReqMaintain |
uint16_t | sectorEraseCount |
PFlash swap control codes | |
#define | FTFx_SWAP_SET_INDICATOR_ADDR 0x01U |
Initialize Swap System control code. More... | |
#define | FTFx_SWAP_SET_IN_PREPARE 0x02U |
Set Swap in Update State. More... | |
#define | FTFx_SWAP_SET_IN_COMPLETE 0x04U |
Set Swap in Complete State. More... | |
#define | FTFx_SWAP_REPORT_STATUS 0x08U |
Report Swap Status. More... | |
PFlash swap states | |
#define | FTFx_SWAP_UNINIT 0x00U |
Uninitialized swap mode. More... | |
#define | FTFx_SWAP_READY 0x01U |
Ready swap mode. More... | |
#define | FTFx_SWAP_UPDATE 0x02U |
Update swap mode. More... | |
#define | FTFx_SWAP_UPDATE_ERASED 0x03U |
Update-Erased swap mode. More... | |
#define | FTFx_SWAP_COMPLETE 0x04U |
Complete swap mode. More... | |
Flash security status | |
#define | FLASH_NOT_SECURE 0x01U |
Flash currently not in secure state. More... | |
#define | FLASH_SECURE_BACKDOOR_ENABLED 0x02U |
Flash is secured and backdoor key access enabled. More... | |
#define | FLASH_SECURE_BACKDOOR_DISABLED 0x04U |
Flash is secured and backdoor key access disabled. More... | |
Null Callback function definition | |
#define | NULL_CALLBACK ((flash_callback_t)0xFFFFFFFFU) |
Null callback. More... | |
Flash driver APIs | |
status_t | FLASH_DRV_Init (const flash_user_config_t *const pUserConf, flash_ssd_config_t *const pSSDConfig) |
Initializes Flash. More... | |
void | FLASH_DRV_GetPFlashProtection (uint32_t *protectStatus) |
P-Flash get protection. More... | |
status_t | FLASH_DRV_SetPFlashProtection (uint32_t protectStatus) |
P-Flash set protection. More... | |
void | FLASH_DRV_GetSecurityState (uint8_t *securityState) |
Flash get security state. More... | |
status_t | FLASH_DRV_SecurityBypass (const flash_ssd_config_t *pSSDConfig, const uint8_t *keyBuffer) |
Flash security bypass. More... | |
status_t | FLASH_DRV_EraseAllBlock (const flash_ssd_config_t *pSSDConfig) |
Flash erase all blocks. More... | |
status_t | FLASH_DRV_VerifyAllBlock (const flash_ssd_config_t *pSSDConfig, uint8_t marginLevel) |
Flash verify all blocks. More... | |
status_t | FLASH_DRV_EraseSector (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size) |
Flash erase sector. More... | |
status_t | FLASH_DRV_VerifySection (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint16_t number, uint8_t marginLevel) |
Flash verify section. More... | |
void | FLASH_DRV_EraseSuspend (void) |
Flash erase suspend. More... | |
void | FLASH_DRV_EraseResume (void) |
Flash erase resume. More... | |
status_t | FLASH_DRV_ReadOnce (const flash_ssd_config_t *pSSDConfig, uint8_t recordIndex, uint8_t *pDataArray) |
Flash read once. More... | |
status_t | FLASH_DRV_ProgramOnce (const flash_ssd_config_t *pSSDConfig, uint8_t recordIndex, const uint8_t *pDataArray) |
Flash program once. More... | |
status_t | FLASH_DRV_Program (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pData) |
Flash program. More... | |
status_t | FLASH_DRV_ProgramCheck (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pExpectedData, uint32_t *pFailAddr, uint8_t marginLevel) |
Flash program check. More... | |
status_t | FLASH_DRV_CheckSum (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, uint32_t *pSum) |
Calculates check sum. More... | |
status_t | FLASH_DRV_ProgramSection (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint16_t number) |
Flash program section. More... | |
status_t | FLASH_DRV_EraseBlock (const flash_ssd_config_t *pSSDConfig, uint32_t dest) |
Flash erase block. More... | |
status_t | FLASH_DRV_VerifyBlock (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint8_t marginLevel) |
Flash verify block. More... | |
status_t | FLASH_DRV_GetEERAMProtection (uint8_t *protectStatus) |
EERAM get protection. More... | |
status_t | FLASH_DRV_SetEERAMProtection (uint8_t protectStatus) |
EERAM set protection. More... | |
status_t | FLASH_DRV_SetFlexRamFunction (const flash_ssd_config_t *pSSDConfig, flash_flexRam_function_control_code_t flexRamFuncCode, uint16_t byteOfQuickWrite, flash_eeprom_status_t *const pEEPROMStatus) |
Set FlexRAM function. More... | |
status_t | FLASH_DRV_EEEWrite (const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pData) |
EEPROM Emulator Write. More... | |
status_t | FLASH_DRV_DEFlashPartition (const flash_ssd_config_t *pSSDConfig, uint8_t uEEEDataSizeCode, uint8_t uDEPartitionCode, uint8_t uCSEcKeySize, bool uSFE) |
Flash D/E-Flash Partition. More... | |
status_t | FLASH_DRV_GetDFlashProtection (const flash_ssd_config_t *pSSDConfig, uint8_t *protectStatus) |
D-Flash get protection. More... | |
status_t | FLASH_DRV_SetDFlashProtection (const flash_ssd_config_t *pSSDConfig, uint8_t protectStatus) |
D-Flash set protection. More... | |
status_t | FLASH_DRV_EraseAllBlockUnsecure (const flash_ssd_config_t *pSSDConfig) |
Flash erase all blocks unsecure. More... | |
#define CLEAR_FTFx_FSTAT_ERROR_BITS FTFx_FSTAT = (uint8_t)(FTFx_FSTAT_FPVIOL_MASK | FTFx_FSTAT_ACCERR_MASK | FTFx_FSTAT_RDCOLERR_MASK) |
Definition at line 377 of file flash_driver.h.
#define CSE_KEY_SIZE_CODE_MAX 0x03U |
Definition at line 467 of file flash_driver.h.
#define DFLASH_IFR_READRESOURCE_ADDRESS 0x8000FCU |
Definition at line 454 of file flash_driver.h.
#define FLASH_CALLBACK_CS 0x0AU |
Callback period count for FlashCheckSum.
This value is only relevant for FlashCheckSum operation, where a high rate of calling back can impair performance. The rest of the flash operations invoke the callback as often as possible while waiting for the flash controller to finish the requested operation.
Definition at line 510 of file flash_driver.h.
#define FLASH_NOT_SECURE 0x01U |
Flash currently not in secure state.
Definition at line 493 of file flash_driver.h.
#define FLASH_SECURE_BACKDOOR_DISABLED 0x04U |
Flash is secured and backdoor key access disabled.
Definition at line 497 of file flash_driver.h.
#define FLASH_SECURE_BACKDOOR_ENABLED 0x02U |
Flash is secured and backdoor key access enabled.
Definition at line 495 of file flash_driver.h.
#define FLASH_SECURITY_STATE_KEYEN 0x80U |
Definition at line 463 of file flash_driver.h.
#define FLASH_SECURITY_STATE_UNSECURED 0x02U |
Definition at line 464 of file flash_driver.h.
#define FTFx_BASE FTFC_BASE |
Definition at line 203 of file flash_driver.h.
#define FTFx_DPHRASE_SIZE 0x0010U |
Definition at line 386 of file flash_driver.h.
#define FTFx_ERASE_ALL_BLOCK 0x44U |
Definition at line 410 of file flash_driver.h.
#define FTFx_ERASE_ALL_BLOCK_UNSECURE 0x49U |
Definition at line 413 of file flash_driver.h.
#define FTFx_ERASE_BLOCK 0x08U |
Definition at line 404 of file flash_driver.h.
#define FTFx_ERASE_SECTOR 0x09U |
Definition at line 405 of file flash_driver.h.
#define FTFx_FCCOB0 FTFC->FCCOB[3] |
Definition at line 211 of file flash_driver.h.
#define FTFx_FCCOB1 FTFC->FCCOB[2] |
Definition at line 210 of file flash_driver.h.
#define FTFx_FCCOB2 FTFC->FCCOB[1] |
Definition at line 209 of file flash_driver.h.
#define FTFx_FCCOB3 FTFC->FCCOB[0] |
Definition at line 208 of file flash_driver.h.
#define FTFx_FCCOB4 FTFC->FCCOB[7] |
Definition at line 215 of file flash_driver.h.
#define FTFx_FCCOB5 FTFC->FCCOB[6] |
Definition at line 214 of file flash_driver.h.
#define FTFx_FCCOB6 FTFC->FCCOB[5] |
Definition at line 213 of file flash_driver.h.
#define FTFx_FCCOB7 FTFC->FCCOB[4] |
Definition at line 212 of file flash_driver.h.
#define FTFx_FCCOB8 FTFC->FCCOB[11] |
Definition at line 219 of file flash_driver.h.
#define FTFx_FCCOB9 FTFC->FCCOB[10] |
Definition at line 218 of file flash_driver.h.
#define FTFx_FCCOB_CCOBn | ( | x | ) | FTFC_FCCOB_CCOBn(x) |
Definition at line 305 of file flash_driver.h.
#define FTFx_FCCOB_CCOBn_MASK FTFC_FCCOB_CCOBn_MASK |
Definition at line 302 of file flash_driver.h.
#define FTFx_FCCOB_CCOBn_SHIFT FTFC_FCCOB_CCOBn_SHIFT |
Definition at line 303 of file flash_driver.h.
#define FTFx_FCCOB_CCOBn_WIDTH FTFC_FCCOB_CCOBn_WIDTH |
Definition at line 304 of file flash_driver.h.
#define FTFx_FCCOBA FTFC->FCCOB[9] |
Definition at line 217 of file flash_driver.h.
#define FTFx_FCCOBB FTFC->FCCOB[8] |
Definition at line 216 of file flash_driver.h.
#define FTFx_FCNFG FTFC->FCNFG |
Definition at line 205 of file flash_driver.h.
#define FTFx_FCNFG_CCIE | ( | x | ) | FTFC_FCNFG_CCIE(x) |
Definition at line 278 of file flash_driver.h.
#define FTFx_FCNFG_CCIE_MASK FTFC_FCNFG_CCIE_MASK |
Definition at line 275 of file flash_driver.h.
#define FTFx_FCNFG_CCIE_SHIFT FTFC_FCNFG_CCIE_SHIFT |
Definition at line 276 of file flash_driver.h.
#define FTFx_FCNFG_CCIE_WIDTH FTFC_FCNFG_CCIE_WIDTH |
Definition at line 277 of file flash_driver.h.
#define FTFx_FCNFG_EEERDY | ( | x | ) | FTFC_FCNFG_EEERDY(x) |
Definition at line 258 of file flash_driver.h.
#define FTFx_FCNFG_EEERDY_MASK FTFC_FCNFG_EEERDY_MASK |
Definition at line 255 of file flash_driver.h.
#define FTFx_FCNFG_EEERDY_SHIFT FTFC_FCNFG_EEERDY_SHIFT |
Definition at line 256 of file flash_driver.h.
#define FTFx_FCNFG_EEERDY_WIDTH FTFC_FCNFG_EEERDY_WIDTH |
Definition at line 257 of file flash_driver.h.
#define FTFx_FCNFG_ERSAREQ | ( | x | ) | FTFC_FCNFG_ERSAREQ(x) |
Definition at line 270 of file flash_driver.h.
#define FTFx_FCNFG_ERSAREQ_MASK FTFC_FCNFG_ERSAREQ_MASK |
Definition at line 267 of file flash_driver.h.
#define FTFx_FCNFG_ERSAREQ_SHIFT FTFC_FCNFG_ERSAREQ_SHIFT |
Definition at line 268 of file flash_driver.h.
#define FTFx_FCNFG_ERSAREQ_WIDTH FTFC_FCNFG_ERSAREQ_WIDTH |
Definition at line 269 of file flash_driver.h.
#define FTFx_FCNFG_ERSSUSP | ( | x | ) | FTFC_FCNFG_ERSSUSP(x) |
Definition at line 266 of file flash_driver.h.
#define FTFx_FCNFG_ERSSUSP_MASK FTFC_FCNFG_ERSSUSP_MASK |
Definition at line 263 of file flash_driver.h.
#define FTFx_FCNFG_ERSSUSP_SHIFT FTFC_FCNFG_ERSSUSP_SHIFT |
Definition at line 264 of file flash_driver.h.
#define FTFx_FCNFG_ERSSUSP_WIDTH FTFC_FCNFG_ERSSUSP_WIDTH |
Definition at line 265 of file flash_driver.h.
#define FTFx_FCNFG_RAMRDY | ( | x | ) | FTFC_FCNFG_RAMRDY(x) |
Definition at line 262 of file flash_driver.h.
#define FTFx_FCNFG_RAMRDY_MASK FTFC_FCNFG_RAMRDY_MASK |
Definition at line 259 of file flash_driver.h.
#define FTFx_FCNFG_RAMRDY_SHIFT FTFC_FCNFG_RAMRDY_SHIFT |
Definition at line 260 of file flash_driver.h.
#define FTFx_FCNFG_RAMRDY_WIDTH FTFC_FCNFG_RAMRDY_WIDTH |
Definition at line 261 of file flash_driver.h.
#define FTFx_FCNFG_RDCOLLIE | ( | x | ) | FTFC_FCNFG_RDCOLLIE(x) |
Definition at line 274 of file flash_driver.h.
#define FTFx_FCNFG_RDCOLLIE_MASK FTFC_FCNFG_RDCOLLIE_MASK |
Definition at line 271 of file flash_driver.h.
#define FTFx_FCNFG_RDCOLLIE_SHIFT FTFC_FCNFG_RDCOLLIE_SHIFT |
Definition at line 272 of file flash_driver.h.
#define FTFx_FCNFG_RDCOLLIE_WIDTH FTFC_FCNFG_RDCOLLIE_WIDTH |
Definition at line 273 of file flash_driver.h.
#define FTFx_FCSESTAT FTFC->FCSESTAT |
Definition at line 226 of file flash_driver.h.
#define FTFX_FCSESTAT_BFN | ( | x | ) | FTFC_FCSESTAT_BFN(x) |
Definition at line 341 of file flash_driver.h.
#define FTFX_FCSESTAT_BFN_MASK FTFC_FCSESTAT_BFN_MASK |
Definition at line 338 of file flash_driver.h.
#define FTFX_FCSESTAT_BFN_SHIFT FTFC_FCSESTAT_BFN_SHIFT |
Definition at line 339 of file flash_driver.h.
#define FTFX_FCSESTAT_BFN_WIDTH FTFC_FCSESTAT_BFN_WIDTH |
Definition at line 340 of file flash_driver.h.
#define FTFX_FCSESTAT_BIN | ( | x | ) | FTFC_FCSESTAT_BIN(x) |
Definition at line 345 of file flash_driver.h.
#define FTFX_FCSESTAT_BIN_MASK FTFC_FCSESTAT_BIN_MASK |
Definition at line 342 of file flash_driver.h.
#define FTFX_FCSESTAT_BIN_SHIFT FTFC_FCSESTAT_BIN_SHIFT |
Definition at line 343 of file flash_driver.h.
#define FTFX_FCSESTAT_BIN_WIDTH FTFC_FCSESTAT_BIN_WIDTH |
Definition at line 344 of file flash_driver.h.
#define FTFX_FCSESTAT_BOK | ( | x | ) | FTFC_FCSESTAT_BOK(x) |
Definition at line 337 of file flash_driver.h.
#define FTFX_FCSESTAT_BOK_MASK FTFC_FCSESTAT_BOK_MASK |
Definition at line 334 of file flash_driver.h.
#define FTFX_FCSESTAT_BOK_SHIFT FTFC_FCSESTAT_BOK_SHIFT |
Definition at line 335 of file flash_driver.h.
#define FTFX_FCSESTAT_BOK_WIDTH FTFC_FCSESTAT_BOK_WIDTH |
Definition at line 336 of file flash_driver.h.
#define FTFX_FCSESTAT_BSY | ( | x | ) | FTFC_FCSESTAT_BSY(x) |
Definition at line 353 of file flash_driver.h.
#define FTFX_FCSESTAT_BSY_MASK FTFC_FCSESTAT_BSY_MASK |
Definition at line 350 of file flash_driver.h.
#define FTFX_FCSESTAT_BSY_SHIFT FTFC_FCSESTAT_BSY_SHIFT |
Definition at line 351 of file flash_driver.h.
#define FTFX_FCSESTAT_BSY_WIDTH FTFC_FCSESTAT_BSY_WIDTH |
Definition at line 352 of file flash_driver.h.
#define FTFX_FCSESTAT_EDB | ( | x | ) | FTFC_FCSESTAT_EDB(x) |
Definition at line 329 of file flash_driver.h.
#define FTFX_FCSESTAT_EDB_MASK FTFC_FCSESTAT_EDB_MASK |
Definition at line 326 of file flash_driver.h.
#define FTFX_FCSESTAT_EDB_SHIFT FTFC_FCSESTAT_EDB_SHIFT |
Definition at line 327 of file flash_driver.h.
#define FTFX_FCSESTAT_EDB_WIDTH FTFC_FCSESTAT_EDB_WIDTH |
Definition at line 328 of file flash_driver.h.
#define FTFX_FCSESTAT_IDB | ( | x | ) | FTFC_FCSESTAT_IDB(x) |
Definition at line 325 of file flash_driver.h.
#define FTFX_FCSESTAT_IDB_MASK FTFC_FCSESTAT_IDB_MASK |
Definition at line 322 of file flash_driver.h.
#define FTFX_FCSESTAT_IDB_SHIFT FTFC_FCSESTAT_IDB_SHIFT |
Definition at line 323 of file flash_driver.h.
#define FTFX_FCSESTAT_IDB_WIDTH FTFC_FCSESTAT_IDB_WIDTH |
Definition at line 324 of file flash_driver.h.
#define FTFX_FCSESTAT_RIN | ( | x | ) | FTFC_FCSESTAT_RIN(x) |
Definition at line 333 of file flash_driver.h.
#define FTFX_FCSESTAT_RIN_MASK FTFC_FCSESTAT_RIN_MASK |
Definition at line 330 of file flash_driver.h.
#define FTFX_FCSESTAT_RIN_SHIFT FTFC_FCSESTAT_RIN_SHIFT |
Definition at line 331 of file flash_driver.h.
#define FTFX_FCSESTAT_RIN_WIDTH FTFC_FCSESTAT_RIN_WIDTH |
Definition at line 332 of file flash_driver.h.
#define FTFX_FCSESTAT_SB | ( | x | ) | FTFC_FCSESTAT_SB(x) |
Definition at line 349 of file flash_driver.h.
#define FTFX_FCSESTAT_SB_MASK FTFC_FCSESTAT_SB_MASK |
Definition at line 346 of file flash_driver.h.
#define FTFX_FCSESTAT_SB_SHIFT FTFC_FCSESTAT_SB_SHIFT |
Definition at line 347 of file flash_driver.h.
#define FTFX_FCSESTAT_SB_WIDTH FTFC_FCSESTAT_SB_WIDTH |
Definition at line 348 of file flash_driver.h.
#define FTFx_FDPROT FTFC->FDPROT |
Definition at line 225 of file flash_driver.h.
#define FTFx_FDPROT_DPROT | ( | x | ) | FTFC_FDPROT_DPROT(x) |
Definition at line 320 of file flash_driver.h.
#define FTFx_FDPROT_DPROT_MASK FTFC_FDPROT_DPROT_MASK |
Definition at line 317 of file flash_driver.h.
#define FTFx_FDPROT_DPROT_SHIFT FTFC_FDPROT_DPROT_SHIFT |
Definition at line 318 of file flash_driver.h.
#define FTFx_FDPROT_DPROT_WIDTH FTFC_FDPROT_DPROT_WIDTH |
Definition at line 319 of file flash_driver.h.
#define FTFx_FEPROT FTFC->FEPROT |
Definition at line 224 of file flash_driver.h.
#define FTFx_FEPROT_EPROT | ( | x | ) | FTFC_FEPROT_EPROT(x) |
Definition at line 315 of file flash_driver.h.
#define FTFx_FEPROT_EPROT_MASK FTFC_FEPROT_EPROT_MASK |
Definition at line 312 of file flash_driver.h.
#define FTFx_FEPROT_EPROT_SHIFT FTFC_FEPROT_EPROT_SHIFT |
Definition at line 313 of file flash_driver.h.
#define FTFx_FEPROT_EPROT_WIDTH FTFC_FEPROT_EPROT_WIDTH |
Definition at line 314 of file flash_driver.h.
#define FTFx_FOPT FTFC->FOPT |
Definition at line 207 of file flash_driver.h.
#define FTFx_FOPT_OPT | ( | x | ) | FTFC_FOPT_OPT(x) |
Definition at line 300 of file flash_driver.h.
#define FTFx_FOPT_OPT_MASK FTFC_FOPT_OPT_MASK |
Definition at line 297 of file flash_driver.h.
#define FTFx_FOPT_OPT_SHIFT FTFC_FOPT_OPT_SHIFT |
Definition at line 298 of file flash_driver.h.
#define FTFx_FOPT_OPT_WIDTH FTFC_FOPT_OPT_WIDTH |
Definition at line 299 of file flash_driver.h.
#define FTFx_FPROT0 FTFC->FPROT[3] |
Definition at line 223 of file flash_driver.h.
#define FTFx_FPROT1 FTFC->FPROT[2] |
Definition at line 222 of file flash_driver.h.
#define FTFx_FPROT2 FTFC->FPROT[1] |
Definition at line 221 of file flash_driver.h.
#define FTFx_FPROT3 FTFC->FPROT[0] |
Definition at line 220 of file flash_driver.h.
#define FTFx_FPROT_PROT | ( | x | ) | FTFC_FPROT_PROT(x) |
Definition at line 310 of file flash_driver.h.
#define FTFx_FPROT_PROT_MASK FTFC_FPROT_PROT_MASK |
Definition at line 307 of file flash_driver.h.
#define FTFx_FPROT_PROT_SHIFT FTFC_FPROT_PROT_SHIFT |
Definition at line 308 of file flash_driver.h.
#define FTFx_FPROT_PROT_WIDTH FTFC_FPROT_PROT_WIDTH |
Definition at line 309 of file flash_driver.h.
#define FTFx_FSEC FTFC->FSEC |
Definition at line 206 of file flash_driver.h.
#define FTFx_FSEC_FSLACC | ( | x | ) | FTFC_FSEC_FSLACC(x) |
Definition at line 287 of file flash_driver.h.
#define FTFx_FSEC_FSLACC_MASK FTFC_FSEC_FSLACC_MASK |
Definition at line 284 of file flash_driver.h.
#define FTFx_FSEC_FSLACC_SHIFT FTFC_FSEC_FSLACC_SHIFT |
Definition at line 285 of file flash_driver.h.
#define FTFx_FSEC_FSLACC_WIDTH FTFC_FSEC_FSLACC_WIDTH |
Definition at line 286 of file flash_driver.h.
#define FTFx_FSEC_KEYEN | ( | x | ) | FTFC_FSEC_KEYEN(x) |
Definition at line 295 of file flash_driver.h.
#define FTFx_FSEC_KEYEN_MASK FTFC_FSEC_KEYEN_MASK |
Definition at line 292 of file flash_driver.h.
#define FTFx_FSEC_KEYEN_SHIFT FTFC_FSEC_KEYEN_SHIFT |
Definition at line 293 of file flash_driver.h.
#define FTFx_FSEC_KEYEN_WIDTH FTFC_FSEC_KEYEN_WIDTH |
Definition at line 294 of file flash_driver.h.
#define FTFx_FSEC_MEEN | ( | x | ) | FTFC_FSEC_MEEN(x) |
Definition at line 291 of file flash_driver.h.
#define FTFx_FSEC_MEEN_MASK FTFC_FSEC_MEEN_MASK |
Definition at line 288 of file flash_driver.h.
#define FTFx_FSEC_MEEN_SHIFT FTFC_FSEC_MEEN_SHIFT |
Definition at line 289 of file flash_driver.h.
#define FTFx_FSEC_MEEN_WIDTH FTFC_FSEC_MEEN_WIDTH |
Definition at line 290 of file flash_driver.h.
#define FTFx_FSEC_SEC | ( | x | ) | FTFC_FSEC_SEC(x) |
Definition at line 283 of file flash_driver.h.
#define FTFx_FSEC_SEC_MASK FTFC_FSEC_SEC_MASK |
Definition at line 280 of file flash_driver.h.
#define FTFx_FSEC_SEC_SHIFT FTFC_FSEC_SEC_SHIFT |
Definition at line 281 of file flash_driver.h.
#define FTFx_FSEC_SEC_WIDTH FTFC_FSEC_SEC_WIDTH |
Definition at line 282 of file flash_driver.h.
#define FTFx_FSTAT FTFC->FSTAT |
Definition at line 204 of file flash_driver.h.
#define FTFx_FSTAT_ACCERR | ( | x | ) | FTFC_FSTAT_ACCERR(x) |
Definition at line 245 of file flash_driver.h.
#define FTFx_FSTAT_ACCERR_MASK FTFC_FSTAT_ACCERR_MASK |
Definition at line 242 of file flash_driver.h.
#define FTFx_FSTAT_ACCERR_SHIFT FTFC_FSTAT_ACCERR_SHIFT |
Definition at line 243 of file flash_driver.h.
#define FTFx_FSTAT_ACCERR_WIDTH FTFC_FSTAT_ACCERR_WIDTH |
Definition at line 244 of file flash_driver.h.
#define FTFx_FSTAT_CCIF | ( | x | ) | FTFC_FSTAT_CCIF(x) |
Definition at line 253 of file flash_driver.h.
#define FTFx_FSTAT_CCIF_MASK FTFC_FSTAT_CCIF_MASK |
Definition at line 250 of file flash_driver.h.
#define FTFx_FSTAT_CCIF_SHIFT FTFC_FSTAT_CCIF_SHIFT |
Definition at line 251 of file flash_driver.h.
#define FTFx_FSTAT_CCIF_WIDTH FTFC_FSTAT_CCIF_WIDTH |
Definition at line 252 of file flash_driver.h.
#define FTFx_FSTAT_FPVIOL | ( | x | ) | FTFC_FSTAT_FPVIOL(x) |
Definition at line 241 of file flash_driver.h.
#define FTFx_FSTAT_FPVIOL_MASK FTFC_FSTAT_FPVIOL_MASK |
Definition at line 238 of file flash_driver.h.
#define FTFx_FSTAT_FPVIOL_SHIFT FTFC_FSTAT_FPVIOL_SHIFT |
Definition at line 239 of file flash_driver.h.
#define FTFx_FSTAT_FPVIOL_WIDTH FTFC_FSTAT_FPVIOL_WIDTH |
Definition at line 240 of file flash_driver.h.
#define FTFx_FSTAT_MGSTAT0 | ( | x | ) | FTFC_FSTAT_MGSTAT0(x) |
Definition at line 237 of file flash_driver.h.
#define FTFx_FSTAT_MGSTAT0_MASK FTFC_FSTAT_MGSTAT0_MASK |
Definition at line 234 of file flash_driver.h.
#define FTFx_FSTAT_MGSTAT0_SHIFT FTFC_FSTAT_MGSTAT0_SHIFT |
Definition at line 235 of file flash_driver.h.
#define FTFx_FSTAT_MGSTAT0_WIDTH FTFC_FSTAT_MGSTAT0_WIDTH |
Definition at line 236 of file flash_driver.h.
#define FTFx_FSTAT_RDCOLERR | ( | x | ) | FTFC_FSTAT_RDCOLERR(x) |
Definition at line 249 of file flash_driver.h.
#define FTFx_FSTAT_RDCOLERR_MASK FTFC_FSTAT_RDCOLERR_MASK |
Definition at line 246 of file flash_driver.h.
#define FTFx_FSTAT_RDCOLERR_SHIFT FTFC_FSTAT_RDCOLERR_SHIFT |
Definition at line 247 of file flash_driver.h.
#define FTFx_FSTAT_RDCOLERR_WIDTH FTFC_FSTAT_RDCOLERR_WIDTH |
Definition at line 248 of file flash_driver.h.
#define FTFx_LONGWORD_SIZE 0x0004U |
Definition at line 382 of file flash_driver.h.
#define FTFx_PFLASH_SWAP 0x46U |
Definition at line 412 of file flash_driver.h.
#define FTFx_PHRASE_SIZE 0x0008U |
Definition at line 384 of file flash_driver.h.
#define FTFx_PROGRAM_CHECK 0x02U |
Definition at line 400 of file flash_driver.h.
#define FTFx_PROGRAM_LONGWORD 0x06U |
Definition at line 402 of file flash_driver.h.
#define FTFx_PROGRAM_ONCE 0x43U |
Definition at line 409 of file flash_driver.h.
#define FTFx_PROGRAM_PARTITION 0x80U |
Definition at line 414 of file flash_driver.h.
#define FTFx_PROGRAM_PHRASE 0x07U |
Definition at line 403 of file flash_driver.h.
#define FTFx_PROGRAM_SECTION 0x0BU |
Definition at line 406 of file flash_driver.h.
#define FTFx_READ_ONCE 0x41U |
Definition at line 408 of file flash_driver.h.
#define FTFx_READ_RESOURCE 0x03U |
Definition at line 401 of file flash_driver.h.
#define FTFx_RSRC_CODE_REG FTFx_FCCOB4 |
Definition at line 390 of file flash_driver.h.
#define FTFx_SECURITY_BY_PASS 0x45U |
Definition at line 411 of file flash_driver.h.
#define FTFx_SET_EERAM 0x81U |
Definition at line 415 of file flash_driver.h.
#define FTFx_SWAP_COMPLETE 0x04U |
Complete swap mode.
Definition at line 445 of file flash_driver.h.
#define FTFx_SWAP_READY 0x01U |
Ready swap mode.
Definition at line 439 of file flash_driver.h.
#define FTFx_SWAP_REPORT_STATUS 0x08U |
Report Swap Status.
Definition at line 429 of file flash_driver.h.
#define FTFx_SWAP_SET_IN_COMPLETE 0x04U |
Set Swap in Complete State.
Definition at line 427 of file flash_driver.h.
#define FTFx_SWAP_SET_IN_PREPARE 0x02U |
Set Swap in Update State.
Definition at line 425 of file flash_driver.h.
#define FTFx_SWAP_SET_INDICATOR_ADDR 0x01U |
Initialize Swap System control code.
Definition at line 423 of file flash_driver.h.
#define FTFx_SWAP_UNINIT 0x00U |
Uninitialized swap mode.
Definition at line 437 of file flash_driver.h.
#define FTFx_SWAP_UPDATE 0x02U |
Update swap mode.
Definition at line 441 of file flash_driver.h.
#define FTFx_SWAP_UPDATE_ERASED 0x03U |
Update-Erased swap mode.
Definition at line 443 of file flash_driver.h.
#define FTFx_VERIFY_ALL_BLOCK 0x40U |
Definition at line 407 of file flash_driver.h.
#define FTFx_VERIFY_BLOCK 0x00U |
Definition at line 398 of file flash_driver.h.
#define FTFx_VERIFY_SECTION 0x01U |
Definition at line 399 of file flash_driver.h.
#define FTFx_WORD_SIZE 0x0002U |
Definition at line 380 of file flash_driver.h.
#define GET_BIT_0_7 | ( | value | ) | ((uint8_t)(((uint32_t)(value)) & 0xFFU)) |
Definition at line 457 of file flash_driver.h.
#define GET_BIT_16_23 | ( | value | ) | ((uint8_t)((((uint32_t)(value)) >> 16) & 0xFFU)) |
Definition at line 459 of file flash_driver.h.
#define GET_BIT_24_31 | ( | value | ) | ((uint8_t)(((uint32_t)(value)) >> 24)) |
Definition at line 460 of file flash_driver.h.
#define GET_BIT_8_15 | ( | value | ) | ((uint8_t)((((uint32_t)(value)) >> 8) & 0xFFU)) |
Definition at line 458 of file flash_driver.h.
#define NULL_CALLBACK ((flash_callback_t)0xFFFFFFFFU) |
Null callback.
Definition at line 521 of file flash_driver.h.
#define RESUME_WAIT_CNT 0x20U |
Resume wait count used in FlashResume function.
Definition at line 449 of file flash_driver.h.
typedef void(* flash_callback_t) (void) |
Call back function pointer data type.
If using callback in the application, any code reachable from this function must not be placed in a Flash block targeted for a program/erase operation. Functions can be placed in RAM section by using the START/END_FUNCTION_DEFINITION/DECLARATION_RAMSECTION macros.
Definition at line 538 of file flash_driver.h.
FlexRAM Function control Code.
Implements : flash_flexRAM_function_control_code_t_Class
Definition at line 479 of file flash_driver.h.
status_t FLASH_DRV_CheckSum | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint32_t | size, | ||
uint32_t * | pSum | ||
) |
Calculates check sum.
This API performs 32 bit sum of each byte data over a specified Flash memory range without carry which provides rapid method for checking data integrity. The callback time period of this API is determined via FLASH_CALLBACK_CS macro in flash_driver.h which is used as a counter value for the CallBack() function calling in this API. This value can be changed as per the user requirement. User can change this value to obtain the maximum permissible callback time period. This API always returns STATUS_SUCCESS if size provided by user is zero regardless of the input validation.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address of the Flash range to be summed. |
[in] | size | Size in byte of the Flash range to be summed. |
[in] | pSum | To return the sum value. |
status_t FLASH_DRV_DEFlashPartition | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t | uEEEDataSizeCode, | ||
uint8_t | uDEPartitionCode, | ||
uint8_t | uCSEcKeySize, | ||
bool | uSFE | ||
) |
Flash D/E-Flash Partition.
This API prepares the FlexNVM block for use as D-Flash, EEPROM backup, or a combination of both and initializes the FlexRAM. In addition, this function is used to configure number of user keys and user key 'Verify Only' attribute if CSEc is enabled.
The single partition choice should be used through entire life time of a given application to guarantee the Flash endurance and data retention of Flash module.
[in] | pSSDConfig | The SSD configuration structure pointer |
[in] | EEEDataSizeCode | EEPROM Data Size Code |
[in] | DEPartitionCode | FlexNVM Partition Code |
[in] | uCSEcKeySize | CSEc Key Size Code, it should be 0 if the function is not used for configuring CSEc part. It can be:
|
[in] | uSFE | Security Flag Extension, it should be false if the function is not used for configuring CSEc part. |
status_t FLASH_DRV_EEEWrite | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint32_t | size, | ||
const uint8_t * | pData | ||
) |
EEPROM Emulator Write.
This API is used to write data to FlexRAM section which is partitioned as EEPROM use for EEPROM operation. After data has been written to EEPROM use section of FlexRAM, the EEPROM file system will create new data record in EEPROM back-up area of FlexNVM in round-robin fashion. There is no alignment constraint for destination and size parameters provided by user. However, according to user's input provided, this API will set priority to write to FlexRAM with following rules: 32-bit writing is invoked if destination is 32 bit aligned and size is not less than 32 bits. 16-bit writing is invoked if destination is 16 bit aligned and size is not less than 16 bits. 8-bit writing is invoked if destination is 8 bit aligned and size is not less than 8 bits.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended write operation. |
[in] | size | Size in byte to be written. |
[in] | pData | Pointer to source address from which data has to be taken for writing operation. |
status_t FLASH_DRV_EraseAllBlock | ( | const flash_ssd_config_t * | pSSDConfig | ) |
Flash erase all blocks.
This API erases all Flash memory, initializes the FlexRAM, verifies all memory contents, and then releases the MCU security.
[in] | pSSDConfig | The SSD configuration structure pointer. |
status_t FLASH_DRV_EraseAllBlockUnsecure | ( | const flash_ssd_config_t * | pSSDConfig | ) |
Flash erase all blocks unsecure.
This API erases all Flash memory, initializes the FlexRAM, verifies all memory contents, and then releases the MCU security.
[in] | pSSDConfig | The SSD configuration structure pointer. |
status_t FLASH_DRV_EraseBlock | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest | ||
) |
Flash erase block.
This API erases all addresses in an individual P-Flash or D-Flash block. For the derivatives including multiply logical P-Flash or D-Flash blocks, this API erases a single block in a single call.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended erase operation. |
void FLASH_DRV_EraseResume | ( | void | ) |
Flash erase resume.
This API is used to resume a previous suspended operation of Flash erase sector command This function must be located in RAM memory or different Flash blocks which are targeted for writing to avoid RWW error.
status_t FLASH_DRV_EraseSector | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint32_t | size | ||
) |
Flash erase sector.
This API erases one or more sectors in P-Flash or D-Flash memory. This API always returns FTFx_OK if size provided by the user is zero regardless of the input validation.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Address in the first sector to be erased. |
[in] | size | Size to be erased in bytes. It is used to determine number of sectors to be erased. |
void FLASH_DRV_EraseSuspend | ( | void | ) |
Flash erase suspend.
This API is used to suspend a current operation of Flash erase sector command. This function must be located in RAM memory or different Flash blocks which are targeted for writing to avoid the RWW error.
status_t FLASH_DRV_GetDFlashProtection | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t * | protectStatus | ||
) |
D-Flash get protection.
This API retrieves current P-Flash protection status. Considering the time consumption for getting protection is very low and even can be ignored, it is not necessary to utilize the Callback function to support the time-critical events.
[in] | pSSDConfig | The SSD configuration structure pointer |
[out] | protectStatus | To return the current value of the D-Flash Protection Register. Each bit is corresponding to protection status of 1/8 of the total D-Flash. The least significant bit is corresponding to the lowest address area of D-Flash. The most significant bit is corresponding to the highest address area of D-Flash and so on. There are two possible cases as below:
|
status_t FLASH_DRV_GetEERAMProtection | ( | uint8_t * | protectStatus | ) |
EERAM get protection.
This API retrieves which EEPROM sections of FlexRAM are protected against program and erase operations. Considering the time consumption for getting protection is very low and even can be ignored, it is not necessary to utilize the Callback function to support the time-critical events
[out] | protectStatus | To return the current value of the EEPROM Protection Register. Each bit is corresponding to protection status of 1/8 of the total EEPROM use. The least significant bit is corresponding to the lowest address area of EEPROM. The most significant bit is corresponding to the highest address area of EEPROM and so on. There are two possible cases as below:
|
void FLASH_DRV_GetPFlashProtection | ( | uint32_t * | protectStatus | ) |
P-Flash get protection.
This API retrieves the current P-Flash protection status. Considering the time consumption for getting protection is very low and even can be ignored. It is not necessary to utilize the Callback function to support the time-critical events.
[out] | protectStatus | To return the current value of the P-Flash Protection. Each bit is corresponding to protection of 1/32 of the total P-Flash. The least significant bit is corresponding to the lowest address area of P-Flash. The most significant bit is corresponding to the highest address area of P-Flash and so on. There are two possible cases as below:
|
void FLASH_DRV_GetSecurityState | ( | uint8_t * | securityState | ) |
Flash get security state.
This API retrieves the current Flash security status, including the security enabling state and the back door key enabling state.
[out] | securityState | To return the current security status code.
|
status_t FLASH_DRV_Init | ( | const flash_user_config_t *const | pUserConf, |
flash_ssd_config_t *const | pSSDConfig | ||
) |
Initializes Flash.
This API initializes Flash module by clearing status error bit and reporting the memory configuration via SSD configuration structure.
[in] | pUserConf | The user configuration structure pointer. |
[in] | pSSDConfig | The SSD configuration structure pointer. |
status_t FLASH_DRV_Program | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint32_t | size, | ||
const uint8_t * | pData | ||
) |
Flash program.
This API is used to program 4 consecutive bytes (for program long word command) and 8 consecutive bytes (for program phrase command) on P-Flash or D-Flash block. This API always returns FTFx_OK if size provided by user is zero regardless of the input validation
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended program operation. |
[in] | size | Size in byte to be programmed |
[in] | pData | Pointer of source address from which data has to be taken for program operation. |
status_t FLASH_DRV_ProgramCheck | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint32_t | size, | ||
const uint8_t * | pExpectedData, | ||
uint32_t * | pFailAddr, | ||
uint8_t | marginLevel | ||
) |
Flash program check.
This API tests a previously programmed P-Flash or D-Flash long word to see if it reads correctly at the specified margin level. This API always returns FTFx_OK if size provided by user is zero regardless of the input validation
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended program check operation. |
[in] | size | Size in byte to check accuracy of program operation |
[in] | pExpectedData | The pointer to the expected data. |
[in] | pFailAddr | Returned the first aligned failing address. |
[in] | marginLevel | Read margin choice as follows:
|
status_t FLASH_DRV_ProgramOnce | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t | recordIndex, | ||
const uint8_t * | pDataArray | ||
) |
Flash program once.
This API is used to program to a reserved 64 byte field located in the P-Flash IFR via given number of record. See the corresponding reference manual to get correct value of this number.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | recordIndex | The record index will be read. It can be from 0x0U to 0x7U or from 0x0U to 0xF according to specific derivative. |
[in] | pDataArray | Pointer to the array from which data will be taken for program once command. |
status_t FLASH_DRV_ProgramSection | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint16_t | number | ||
) |
Flash program section.
This API will program the data found in the Section Program Buffer to previously erased locations in the Flash memory. Data is preloaded into the Section Program Buffer by writing to the acceleration Ram and FlexRam while it is set to function as a RAM. The Section Program Buffer is limited to the value of FlexRam divides by a ratio. Refer to the associate reference manual to get correct value of this ratio. For derivatives including swap feature, the swap indicator address is encountered during FlashProgramSection, it is bypassed without setting FPVIOL but the content are not be programmed. In addition, the content of source data used to program to swap indicator will be re-initialized to 0xFF after completion of this command.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended program operation. |
[in] | number | Number of alignment unit to be programmed. Refer to associate reference manual to get correct value of this alignment constrain. |
status_t FLASH_DRV_ReadOnce | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t | recordIndex, | ||
uint8_t * | pDataArray | ||
) |
Flash read once.
This API is used to read out a reserved 64 byte field located in the P-Flash IFR via given number of record. See the corresponding reference manual to get the correct value of this number.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | recordIndex | The record index will be read. It can be from 0x0U to 0x7U or from 0x0U to 0xF according to specific derivative. |
[in] | pDataArray | Pointer to the array to return the data read by the read once command. |
status_t FLASH_DRV_SecurityBypass | ( | const flash_ssd_config_t * | pSSDConfig, |
const uint8_t * | keyBuffer | ||
) |
Flash security bypass.
This API un-secures the device by comparing the user's provided back door key with the ones in the Flash Configuration Field. If they are matched, the security is released. Otherwise, an error code is returned.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | keyBuffer | Point to the user buffer containing the back door key. |
status_t FLASH_DRV_SetDFlashProtection | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t | protectStatus | ||
) |
D-Flash set protection.
This API sets the D-Flash protection to the intended protection status. Setting D-Flash protection status is subject to a protection transition restriction. If there is a setting violation, it returns failed information and the current protection status will not be changed.
[in] | pSSDConfig | The SSD configuration structure pointer |
[in] | protectStatus | The expected protect status user wants to set to D-Flash Protection Register. Each bit is corresponding to protection status of 1/8 of the total D-Flash. The least significant bit is corresponding to the lowest address area of D-Flash. The most significant bit is corresponding to the highest address area of D-Flash and so on. There are two possible cases as below:
|
status_t FLASH_DRV_SetEERAMProtection | ( | uint8_t | protectStatus | ) |
EERAM set protection.
This API sets protection to the intended protection status for EEPROM us area of FlexRam. This is subject to a protection transition restriction. If there is a setting violation, it returns failed information and the current protection status will not be changed.
[in] | protectStatus | The intended protection status value should be written to the EEPROM Protection Register. Each bit is corresponding to protection status of 1/8 of the total EEPROM use. The least significant bit is corresponding to the lowest address area of EEPROM. The most significant bit is corresponding to the highest address area of EEPROM and so on. There are two possible cases as below:
|
status_t FLASH_DRV_SetFlexRamFunction | ( | const flash_ssd_config_t * | pSSDConfig, |
flash_flexRam_function_control_code_t | flexRamFuncCode, | ||
uint16_t | byteOfQuickWrite, | ||
flash_eeprom_status_t *const | pEEPROMStatus | ||
) |
Set FlexRAM function.
This function is used to change the function of the FlexRAM. When not partitioned for emulated EEPROM, the FlexRAM is typically used as traditional RAM. Otherwise, the FlexRam is typically used to store EEPROM data, the writing to EEPROM is normal write or quick write. In addition, this function may be used to get EEPROM status or complete interrupted EEPROM quick write process. For example, after partitioning to have EEPROM backup, FlexRAM is used for EEPROM use accordingly and if want to change FlexRAM to traditional RAM for FlashProgramSection() use, call this API with the function control code is 0xFFU.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | flexRamFuncCode | FlexRam function control code. It can be:
|
[in] | byteOfQuickWrite | Number of FlexRAM bytes allocated for EEPROM quick writes. This parameter is only used for EEE_QUICK_WRITE command, it should be 0 if the function is not used for EEEPROM quick write. |
[out] | pEEPROMStatus | Pointer to the EEPROM status. This parameter is only used for EEE_STATUS_QUERY command, it should be NULL if the function is not used for EEPROM status query. |
status_t FLASH_DRV_SetPFlashProtection | ( | uint32_t | protectStatus | ) |
P-Flash set protection.
This API sets the P-Flash protection to the intended protection status. Setting P-Flash protection status is subject to a protection, transition restriction. If there is a setting violation, it returns an error code and the current protection status will not be changed.
[in] | protectStatus | The expected protect status user wants to set to P-Flash protection register. Each bit is corresponding to protection of 1/32 of the total P-Flash. The least significant bit is corresponding to the lowest address area of P-Flash. The most significant bit is corresponding to the highest address area of P- Flash, and so on. There are two possible cases as shown below:
|
status_t FLASH_DRV_VerifyAllBlock | ( | const flash_ssd_config_t * | pSSDConfig, |
uint8_t | marginLevel | ||
) |
Flash verify all blocks.
This function checks to see if the P-Flash and/or D-Flash, EEPROM backup area, and D-Flash IFR have been erased to the specified read margin level, if applicable, and releases security if the readout passes.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | marginLevel | Read Margin Choice as follows:
|
status_t FLASH_DRV_VerifyBlock | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint8_t | marginLevel | ||
) |
Flash verify block.
This API checks to see if an entire P-Flash or D-Flash block has been erased to the specified margin level For the derivatives including multiply logical P-Flash or D-Flash blocks, this API erases a single block in a single call.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended verify operation. |
[in] | marginLevel | Read Margin Choice as follows:
|
status_t FLASH_DRV_VerifySection | ( | const flash_ssd_config_t * | pSSDConfig, |
uint32_t | dest, | ||
uint16_t | number, | ||
uint8_t | marginLevel | ||
) |
Flash verify section.
This API checks if a section of the P-Flash or the D-Flash memory is erased to the specified read margin level.
[in] | pSSDConfig | The SSD configuration structure pointer. |
[in] | dest | Start address for the intended verify operation. |
[in] | number | Number of alignment unit to be verified. Refer to corresponding reference manual to get correct information of alignment constrain. |
[in] | marginLevel | Read Margin Choice as follows:
|
uint8_t brownOutCode |
Brown-out detection code
Definition at line 600 of file flash_driver.h.
flash_callback_t CallBack |
Call back function to service the time critical events. Any code reachable from this function must not be placed in a Flash block targeted for a program/erase operation
Definition at line 560 of file flash_driver.h.
flash_callback_t CallBack |
Call back function to service the time critical events. Any code reachable from this function must not be placed in a Flash block targeted for a program/erase operation
Definition at line 589 of file flash_driver.h.
uint32_t DFlashBase |
For FlexNVM device, this is the base address of D-Flash memory (FlexNVM memory); For non-FlexNVM device, this field is unused
Definition at line 556 of file flash_driver.h.
uint32_t DFlashBase |
For FlexNVM device, this is the base address of D-Flash memory (FlexNVM memory); For non-FlexNVM device, this field is unused
Definition at line 580 of file flash_driver.h.
uint32_t DFlashSize |
For FlexNVM device, this is the size in byte of area which is used as D-Flash from FlexNVM memory; For non-FlexNVM device, this field is unused
Definition at line 582 of file flash_driver.h.
uint32_t EEESize |
For FlexNVM device, this is the size in byte of EEPROM area which was partitioned from FlexRAM; For non-FlexNVM device, this field is unused
Definition at line 587 of file flash_driver.h.
uint32_t EERAMBase |
The base address of FlexRAM (for FlexNVM device) or acceleration RAM memory (for non-FlexNVM device)
Definition at line 558 of file flash_driver.h.
uint32_t EERAMBase |
The base address of FlexRAM (for FlexNVM device) or acceleration RAM memory (for non-FlexNVM device)
Definition at line 585 of file flash_driver.h.
uint16_t numOfRecordReqMaintain |
Number of EEPROM quick write records requiring maintenance
Definition at line 601 of file flash_driver.h.
uint32_t PFlashBase |
The base address of P-Flash memory
Definition at line 554 of file flash_driver.h.
uint32_t PFlashBase |
The base address of P-Flash memory
Definition at line 578 of file flash_driver.h.
uint32_t PFlashSize |
The size in byte of P-Flash memory
Definition at line 555 of file flash_driver.h.
uint32_t PFlashSize |
The size in byte of P-Flash memory
Definition at line 579 of file flash_driver.h.
uint16_t sectorEraseCount |
EEPROM sector erase count
Definition at line 602 of file flash_driver.h.