Unable to write to unprotected K64 flash sector

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

Unable to write to unprotected K64 flash sector

780 Views
dmcamens
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

764 Views
dmcamens
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

774 Views
nxf56274
NXP Employee
NXP Employee

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

759 Views
dmcamens
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

742 Views
nxf56274
NXP Employee
NXP Employee

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

777 Views
myke_predko
Senior Contributor III

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

766 Views
dmcamens
Contributor I

Hi @myke_predko,

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

754 Views
myke_predko
Senior Contributor III

@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