unknown status from FLASH_VerifyErase routine on LPC55

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

unknown status from FLASH_VerifyErase routine on LPC55

Jump to solution
1,185 Views
_Ferrari_
Contributor IV

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

Tags (1)
0 Kudos
Reply
1 Solution
941 Views
_Ferrari_
Contributor IV

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

View solution in original post

0 Kudos
Reply
4 Replies
1,094 Views
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 Kudos
Reply
942 Views
_Ferrari_
Contributor IV

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 Kudos
Reply
1,025 Views
_Ferrari_
Contributor IV

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 Kudos
Reply
953 Views
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 Kudos
Reply