Unable to write to unprotected K64 flash sector

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write to unprotected K64 flash sector

191 Views
Contributor I

We have been receiving reports of bricked units in the field.  The units use the K64.  I have extracted the contents of the flash from 3 bricked units.  They all exhibit the same symptom which is flash sector FE000 cannot be written to.  Also the first 16 bytes in this sector cannot be read and my flash programming tool shows these 16 bytes as XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.  I have confirmed that the FPROTn data in the flash is all FF which means all sectors are unprotected.

I looked for the MGSTAT0 bit however it appears to not be stored in the non-volatile flash.  Is that correct?

What could cause these symptoms?  Could loss of power during a flash erase possibly cause this?

Is there anything I can look at within the flash contents that might give more clues as to what is going on?

0 Kudos
7 Replies

175 Views
Contributor I

Could this flash sector error be caused by flash wear (i.e. too many erase/write cycles)?  The spec for the K64 lists max cycles as 50k.

0 Kudos

185 Views
NXP TechSupport
NXP TechSupport

Hi,

Yes. The unstable power will make device bricked. Here is the document which describes the possible reason making the device locked.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

170 Views
Contributor I

I have confirmed that the flash is not locked.  Most of the flash can be erased and written to.  It is only one sector that has the issue.  Could it be from too many erase/write cycles?

0 Kudos

153 Views
NXP TechSupport
NXP TechSupport

Hi,

So you use the swap feature? And the swap indicator is stored in last sector? Can you erase the last sector? 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

188 Views
Senior Contributor II

Hi @dmcamens 

I presume that you're working with a 1Megabyte device.  

I believe this is the last sector in the second block of Flash - and it is generally reserved for use in swapping between the two blocks of Flash for system updating.  You should never write to it (and, with it, you shouldn't write to 0x7E000 which is the last sector of the first block).  If you're swapping or have enabled swapping, writing to this sector will cause the device to brick and will need a direct debugger link to reprogram/re-enable the K64.

You should be writing to 0xFC000 instead.  

I hope this helps,

myke

0 Kudos

177 Views
Contributor I

Hi @mykepredkomimet,

Thanks for replying to my post.  Yes this processor has a 1MB flash.  FE000 is actually the second to the last sector.  The last sector is FF000 and you are correct we use this last sector for the flash indicator.

0 Kudos

165 Views
Senior Contributor II

@dmcamens 

Thank you for clarifying that.  Sorry, I thought hte Flash block was larger.  

Good luck with your problem, hopefully @nxf56274 is helping to put you on the right path.

myke

0 Kudos