kinetis K60_120 Mhz NFC ECC protection question

cancel
Showing results for 
Search instead for 
Did you mean: 

kinetis K60_120 Mhz NFC ECC protection question

456 Views
henrynguyen
Contributor III

Hi all,

i am new to the Kinetis K60_120 MHz family.  we are looking at this part to implement a memory controller interface to NAND flash with ECC.

From reading the K60 Sub-Family reference manual with addendum, i think i understand how the ECC is being used to correct the data and how the main data is organized in conjunction with the ECC.

however, i do not see any mention about the possibility of ECC bit itself got flipped and how to protect and correct the flipped ECC bit in the spared area?  The flipped possibility is small as the spared area is a lot smaller than the main data area, but it can happen.

Atmel SAM3x Nand flash controller has the parity associated with the ECC in the spare area where application can do the correction.  

I wonder if Kinetis K60 has something like that.  

Thank you.

Henry Nguyen

8 Replies

137 Views
michael_galda
NXP Employee
NXP Employee

I did a little experiment hope that will clear your doubt.

 

First, save and read back a page with ECC set to 32-bytes ECC. Save off the 60 ECC bytes (HW generated) at the end of the spare bytes. Save a page without HW ECC bytes enabled, but with previous save ECC bytes and has random one bit flipped in ECC bytes, then read back with HW ECC enabled. The content of the page data is unchanged, but the algorithm has change in the 60-ECC bytes.

 

  1. HW ECC detects and corrects the ECC bytes.
  2. Yes, it can correct 3 –bit error. As long as the whole page + spare is within the ECC set in the NFC_CFG[ECCMODE]. For example, if the ECCMODE = 001b (4-bit error), it can detect and correct 4 bit in page + spare (the spare includes the ECC bytes).

 

Attached is the sample code, user can change any bit in the eccbytes[16] array.

0 Kudos

137 Views
michael_galda
NXP Employee
NXP Employee

The ECC protects and corrects both data and ECC bytes.

As long as the error number in one page (subpage) is less than or equal to the correction ability (defined by ECC_MODE), all the errors in that page can be corrected, no matter the error location is in data or ECC.

0 Kudos

137 Views
michael_galda
NXP Employee
NXP Employee

I have contacted the design people for clarification / more details.

The standard documentation is not clear about this.

Thanks for the patience.

Michael

0 Kudos

137 Views
michael_galda
NXP Employee
NXP Employee

Hi Henry,

Thanks for the clarification.

Unfortunately I am unable to see your contact email (strange thing). Can you please send me a message to:

michael.galda@nxp.com

I have also notified my colleagues in Austin/TX, so I hope somebody will contact you with the NDA and maybe they can assist you directly.

Thanks,

Michael

0 Kudos

137 Views
michael_galda
NXP Employee
NXP Employee

Hi, 

If I understood it properly,  you just want to know, how the flash controller handles with the ECC errors.

This is one of the good questions, I cannot answer directly. Nobody cares about the NAND flash controller, it is just working somehow. I am very surprised, it is not documented well.

Seriously, I will look to the design PDM and contact the appropriate design people to answer this.

This can take some time, so please be patient.

Thanks,

Michael

137 Views
henrynguyen
Contributor III

Hi Michael,

Thank you.  Please let us know as soon as you find out the info.  this is very critical for us to evaluate how the ECC bits themselves are detected (flipped).  as long as we know the ECC bits are no longer valid, that is ok, but we would like to know.

Thank you.

henry

0 Kudos

137 Views
michael_galda
NXP Employee
NXP Employee

Hi Henry,

I have found the NFC block guide, with more information included. I don't know, if this will really answer everything to you.

But we cannot share this document with everybody.

What is your company / project please? 

Maybe we can share this under the signed NDA (Non disclosure agreement)

Thanks,

Michael

0 Kudos

137 Views
henrynguyen
Contributor III

Hi Michael,

Thank you for looking into this.  

I work for Schlumberger in Houston Texas and we are looking at the feasibility of the 16GB memory for downhole application.  this is to collect measurement data so we need to ensure our NAND flash is ECC protected and the ECC bits error themselves can be detected as well (not expect to be corrected for ECC bits flipped).

I am very happy to sign any NDA.  the email address that i signed up for the forum is my work email.  please send NDA directly to it.  if you need my work email again, please let me know your work email and i can send it directly to you.

Thanks,

Henry

0 Kudos