unknown status from FLASH_VerifyErase routine on LPC55

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

unknown status from FLASH_VerifyErase routine on LPC55

跳至解决方案
2,517 次查看
_Ferrari_
Contributor V

I am developing a project based on the LPC5526 CPU.
I am using the flash to write setup values that are written only once and read only at power on using the routines in the iap_flash.c file.
I use the FLASH_VerifyErase routine to check that the flash has been written, but sometimes the routine returns a state=105 that is not included in the list of possible states.

Has anyone else had a similar problem? If so, how was it resolved?
Thank you very much for your help and collaboration
Best regards

标记 (1)
0 项奖励
回复
1 解答
2,273 次查看
_Ferrari_
Contributor V

Thank you very much for your message.

Just for reference this is the list of possible flash state errors:

kStatus_FLASH_Success .............................  0
kStatus_FLASH_InvalidArgument .....................  4
kStatus_FLASH_SizeError ........................... 100
kStatus_FLASH_AlignmentError ...................... 101
kStatus_FLASH_AddressError ........................ 102
kStatus_FLASH_AccessError ......................... 103
kStatus_FLASH_ProtectionViolation ................. 104
kStatus_FLASH_CommandFailure ...................... 105
kStatus_FLASH_UnknownProperty ..................... 106
kStatus_FLASH_EraseKeyError ....................... 107
kStatus_FLASH_RegionExecuteOnly ................... 108
kStatus_FLASH_ExecuteInRamFunctionNotReady ........ 109
kStatus_FLASH_CommandNotSupported ................. 111
kStatus_FLASH_ReadOnlyProperty .................... 112
kStatus_FLASH_InvalidPropertyValue ................ 113
kStatus_FLASH_InvalidSpeculationOption ............ 114
kStatus_FLASH_EccError ............................ 116
kStatus_FLASH_CompareError ........................ 117
kStatus_FLASH_RegulationLoss ...................... 118
kStatus_FLASH_InvalidWaitStateCycles .............. 119
kStatus_FLASH_OutOfDateCfpaPage ................... 132
kStatus_FLASH_BlankIfrPageData .................... 133
kStatus_FLASH_EncryptedRegionsEraseNotDoneAtOnce .. 134
kStatus_FLASH_ProgramVerificationNotAllowed ....... 135
kStatus_FLASH_HashCheckError ...................... 136
kStatus_FLASH_SealedFfrRegion ..................... 137
kStatus_FLASH_FfrRegionWriteBroken ................ 138
kStatus_FLASH_NmpaAccessNotAllowed ................ 139
kStatus_FLASH_CmpaCfgDirectEraseNotAllowed ........ 140
kStatus_FLASH_FfrBankIsLocked ..................... 141

 

regards

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,426 次查看
Xu_Zhang
NXP Employee
NXP Employee

hi,_Ferrari_

 FLASH_VerifyErase is used to check whether erase is successful, and FLASH_VerifyProgram is used to check whether write is successful. You can refer to lpcxpresso55s28_flashiap1 to try.

Xu_Zhang_0-1695708144594.pngXu_Zhang_1-1695708150354.png

 

BR

Xu Zhang

0 项奖励
回复
2,274 次查看
_Ferrari_
Contributor V

Thank you very much for your message.

Just for reference this is the list of possible flash state errors:

kStatus_FLASH_Success .............................  0
kStatus_FLASH_InvalidArgument .....................  4
kStatus_FLASH_SizeError ........................... 100
kStatus_FLASH_AlignmentError ...................... 101
kStatus_FLASH_AddressError ........................ 102
kStatus_FLASH_AccessError ......................... 103
kStatus_FLASH_ProtectionViolation ................. 104
kStatus_FLASH_CommandFailure ...................... 105
kStatus_FLASH_UnknownProperty ..................... 106
kStatus_FLASH_EraseKeyError ....................... 107
kStatus_FLASH_RegionExecuteOnly ................... 108
kStatus_FLASH_ExecuteInRamFunctionNotReady ........ 109
kStatus_FLASH_CommandNotSupported ................. 111
kStatus_FLASH_ReadOnlyProperty .................... 112
kStatus_FLASH_InvalidPropertyValue ................ 113
kStatus_FLASH_InvalidSpeculationOption ............ 114
kStatus_FLASH_EccError ............................ 116
kStatus_FLASH_CompareError ........................ 117
kStatus_FLASH_RegulationLoss ...................... 118
kStatus_FLASH_InvalidWaitStateCycles .............. 119
kStatus_FLASH_OutOfDateCfpaPage ................... 132
kStatus_FLASH_BlankIfrPageData .................... 133
kStatus_FLASH_EncryptedRegionsEraseNotDoneAtOnce .. 134
kStatus_FLASH_ProgramVerificationNotAllowed ....... 135
kStatus_FLASH_HashCheckError ...................... 136
kStatus_FLASH_SealedFfrRegion ..................... 137
kStatus_FLASH_FfrRegionWriteBroken ................ 138
kStatus_FLASH_NmpaAccessNotAllowed ................ 139
kStatus_FLASH_CmpaCfgDirectEraseNotAllowed ........ 140
kStatus_FLASH_FfrBankIsLocked ..................... 141

 

regards

0 项奖励
回复
2,357 次查看
_Ferrari_
Contributor V

Thank you very much for your reply.

I think I wasn't clear enough. I'm not sure what error the FLASH_VerifyErase function returns if the sector is not erased.

Thank you very much for your help and cooperation.

Best regards.

0 项奖励
回复
2,285 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @_Ferrari_ 

Please refer to the flash demo under SDK, there are flash erase/program/verify steps.

 

BR

Alice

0 项奖励
回复