Kinetis series NAND Flash Controller (NFC) the CE1 function  has some problems

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

Kinetis series NAND Flash Controller (NFC) the CE1 function  has some problems

Jump to solution
1,828 Views
liu_fuchuan
Contributor I

Hello everyone, I am going on a project using MK20FN1M0VLQ12, using NAND Flash Controller (NFC) built in the MCU to control Samsung 2GB of flash, the part number is K9WAG08U1M,and its specific parameters you can refer to the attachments. TThe Samsung 2GB flash contains two 1GB of FLASH,one of them is selected by the pin CE0, CE1 , and its READY/BUSY state feedback is given by the R/B0 or R/B1 pin. The K series MCU have NFC chip select CE0, CE1, and just one  READY/BUSY pin (R / B). My design connects the two  pins  ,R/B0 and R/B1 of the Samsung 2GB flash hardware ,together to the NFC's  R / B pin.And the CE0,CE1 are connected to their corresponding NFC pins. Using the Freescale official DEMO, when the NFC chip select CE0 is enable, choosing the first piece 1G of the FLASH, the block erase, page program, page read functions are right, but when the second piece CE1 is enable, the write error occurs. The specific phenomenon is: when either block erase or page write is done , then I read out the value of the corresponding address that has been erased or writen,but  the value are weird: dozens of 0x30303030 appears at the begin of the data that read out, then the correct data seems like appear by a left shift. Data is shown in the attachment text. Program is also shown in the attachment.

Ps: my colleague using the K60 chip board encountered the same problem. Initially concluded that the problem should be  in the CE chip select and R / B pins, or the Timing aspects. Please help to analyze the problem combining the information given above. I'm confused by this problem for a long time,Please provide some help, thank you!!!

 

Original Attachment has been moved to: SAVE2013-7-2_16-28-39.TXT.zip

Original Attachment has been moved to: NandFlash.zip

Labels (1)
Tags (3)
0 Kudos
1 Solution
1,053 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

For there only with one NFC_RB pin available for both chip select NFC_CE0 and NFC_CE1. Please set both [RB1] and [RB0] at NFC_RAR regiser, when you are using NFC_CE1.

Wish it helps.

B.R.

Ma Hui

View solution in original post

0 Kudos
8 Replies
1,054 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

For there only with one NFC_RB pin available for both chip select NFC_CE0 and NFC_CE1. Please set both [RB1] and [RB0] at NFC_RAR regiser, when you are using NFC_CE1.

Wish it helps.

B.R.

Ma Hui

0 Kudos
1,053 Views
bowerymarc
Contributor V

Are you sure about that Ma Hui?  Because the K20 manual contradicts that advice... from the NFC_RAR field description:

RB1

Determines if NFC_R/ B 1 is waited on a wait for R/ B command. If an equal number of NFC_CE and NFC_R/ B lines are used, the CS n and RB n fields must contain identical values. If only one NFC_R/ B is used, then CS n determines the true chip select, and this field is always 0.

  1. 0  NFC_R/ B 1 is disabled
  2. 1  NFC_R/ B 1 is enabled

24 Ready/busy 0 enable

RB0

Determines if NFC_R/ B 0 is waited on a wait for R/ B command. If an equal number of NFC_CE and NFC_R/ B lines are used, the CS n and RB n fields must contain identical values. If only one NFC_R/ B is used, then CS n determines the true chip select, and this field is always 1.

  1. 0  NFC_R/ B 0 is disabled
  2. 1  NFC_R/ B 0 is enabled

 

 

  I'm working with a K20 and have two separate NAND flash, with R/B connected together, and the second NAND (on CE1) isn't working, I'm getting the '0303' pattern...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
1,053 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Marc,

I got the confirmation mail from Kinetis product team. For your issue, Please set both [RB1] and [RB0] at NFC_RAR register, when you are using NFC_CE1.


Wish it helps.

Best regards,
Ma Hui

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

0 Kudos
1,053 Views
bowerymarc
Contributor V

Hi Ma Hui,

OK some more investigation.  With my board setup (K20F120M and two MT29F16G16 NAND flash, with page set to 2113 due to another bug (i.e. 2048 data 64 spare, 60 byte ECC)), I wrote constant incrementing bytes to a page on the NAND at CE1 (after erasing the block) and here is what I got.  I'm guessing there is something odd going on with the NFC buffer mapping?  I have all mapping set to normal, as I'm dealing with full pages only (btw, once working around the bug regarding the spare area, the NAND at CE0 works perfectly).  Here's the dump of the page:

byte#

0            : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

16          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

32          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

48          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

64          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

80          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

96          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

112          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

128          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

144          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

160          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

176          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

192          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

208          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

224          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

240          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

256          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

272          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

288          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

304          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

320          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

336          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

352          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

368          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

384          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

400          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

416          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

432          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

448          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

464          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

480          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

496          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

512          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

528          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

544          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

560          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

576          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

592          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

608          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

624          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

640          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

656          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

672          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

688          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

704          : 00300030  00300030  00300030  00300030  0.0.0.0.0.0.0.0.

720          : 00020000  00000004  00000000  00000D00  ................

736          : 00000000  00000000  00000000  00000000  ................

752          : 00000000  00000000  00000000  00000000  ................

768          : 00000000  00000000  00000000  00000000  ................

784          : 00000000  00000000  00000000  00000000  ................

800          : 00000000  00000000  00000000  00000000  ................

816          : 00000000  00000000  00000000  00000000  ................

832          : 00000000  00000000  00000000  00000000  ................

848          : 00000000  00000000  00000000  00000000  ................

864          : 00000000  00000000  00000000  00000000  ................

880          : 00000000  00000000  00000000  00000000  ................

896          : 00000000  00000000  00000000  00000000  ................

912          : 00000000  00000000  00000000  00000000  ................

928          : 50524050  46545144  00404848  00000000  P@RPDQTFHH@.....

944          : 00000000  00000000  00000000  00000000  ................

960          : 00000000  00000000  00000000  00000000  ................

976          : 00000000  00000000  00000000  00000000  ................

992          : 13121110  17161514  1B1A1918  1F1E1D1C  ................

1008        : 21222120  27262524  2B2A2928  2F2E2D2C  !"!$%&'()*+,-./

1024        : 31323130  37363534  3B3A3938  3F3E3D3C  0121456789:;<=>?

1040        : 43424140  47464544  4B4A4948  4F4E4D4C  @ABCDEFGHIJKLMNO

1056        : 53525150  57565554  5B5A5958  5F5E5D5C  PQRSTUVWXYZ[\]^_

1072        : 63626160  67666564  6B6A6968  6F6E6D6C  `abcdefghijklmno

1088        : 73727170  77767574  7B7A7978  7F7E7D7C  pqrstuvwxyz{|}~.

1104        : 83828180  87868584  8B8A8988  8F8E8D8C  ................

1120        : 93929190  97969594  9B9A9998  9F9E9D9C  ................

1136        : A3A2A1A0  A7A6A5A4  ABAAA9A8  AFAEADAC  ................

1152        : B3B2B1B0  B7B6B5B4  BBBAB9B8  BFBEBDBC  ................

1168        : C3C2C1C0  C7C6C5C4  CBCAC9C8  CFCECDCC  ................

1184        : D3D2D1D0  D7D6D5D4  DBDAD9D8  DFDEDDDC  ................

1200        : E3E2E1E0  E7E6E5E4  EBEAE9E8  EFEEEDEC  ................

1216        : F3F2F1F0  F7F6F5F4  FBFAF9F8  FFFEFDFC  ................

1232        : 03020100  07060504  0B0A0908  0F0E0D0C  ................

1248        : 13121110  17161514  1B1A1918  1F1E1D1C  ................

1264        : 23222120  27262524  2B2A2928  2F2E2D2C  !"#$%&'()*+,-./

1280        : 33323130  37363534  3B3A3938  3F3E3D3C  0123456789:;<=>?

1296        : 43424140  47464544  4B4A4948  4F4E4D4C  @ABCDEFGHIJKLMNO

1312        : 53525150  57565554  5B5A5958  5F5E5D5C  PQRSTUVWXYZ[\]^_

1328        : 63626160  67666564  6B6A6968  6D6E6D6C  `abcdefghijklmnm

1344        : 73727170  77767574  7B7A7978  7F7E7D7C  pqrstuvwxyz{|}~.

1360        : 83828180  85868584  8B8A8988  8F8E8D8C  ................

1376        : 93929190  95969594  9B9A9998  9F9E9D9C  ................

1392        : A3A2A1A0  A7A6A5A4  ABAAA9A8  AFAEADAC  ................

1408        : B3B2B1B0  B7B6B5B4  BBBAB9B8  BFBEBDBC  ................

1424        : C3C2C1C0  C7C6C5C4  CBCAC9C8  CFCECDCC  ................

1440        : D3D2D1D0  D7D6D5D4  DBDAD9D8  DFDEDDDC  ................

1456        : E3E2E1E0  E7E6E5E4  EBEAE9E8  EFEEEDEC  ................

1472        : F3F2F1F0  F7F6F5F4  FBFAF9F8  FFFEFDFC  ................

1488        : 03020100  07060504  0B0A0908  0F0E0D0C  ................

1504        : 13121110  17161514  1B1A1918  1F1E1D1C  ................

1520        : 23222120  27262524  2B2A2928  2F2E2D2C  !"#$%&'()*+,-./

1536        : 33323130  37363534  3B3A3938  3F3E3D3C  0123456789:;<=>?

1552        : 43424140  47464544  4B4A4948  4F4E4D4C  @ABCDEFGHIJKLMNO

1568        : 53525150  57565554  5B5A5958  5F5E5D5C  PQRSTUVWXYZ[\]^_

1584        : 63626160  67666564  6B6A6968  6F6E6D6C  `abcdefghijklmno

1600        : 73727170  77767574  7B7A7978  7F7E7D7C  pqrstuvwxyz{|}~.

1616        : 83828180  87868584  8B8A8988  8F8E8D8C  ................

1632        : 93929190  97969594  9B9A9998  9F9E9D9C  ................

1648        : A3A2A1A0  A7A6A5A4  ABAAA9A8  AFAEADAC  ................

1664        : B3B2B1B0  B7B6B5B4  BBBAB9B8  BFBEBDBC  ................

1680        : C3C2C1C0  C7C6C5C4  C9CAC9C8  CFCECDCC  ................

1696        : D3D2D1D0  D7D6D5D4  DBDAD9D8  DFDEDDD4  ................

1712        : E3E2E1E0  E7E6E5E4  EBEAE9E8  EFEEEDEC  ................

1728        : F3F2F1F0  F7F6F5F4  FBFAF9F8  FFFEFDFC  ................

1744        : 03020100  07060504  0B0A0908  0F0E0D0C  ................

1760        : 13121110  17161514  191A1918  1F1E1D1C  ................

1776        : 23222120  27262524  2B2A2928  2F2E2D2C  !"#$%&'()*+,-./

1792        : 33323130  37363534  3B3A3938  3F3E3D3C  0123456789:;<=>?

1808        : 43424140  47464544  4B4A4948  4F4E4D4C  @ABCDEFGHIJKLMNO

1824        : 53525150  57565554  5B5A5958  5F5E5D5C  PQRSTUVWXYZ[\]^_

1840        : 63626160  67666564  6B6A6968  6F6E6D6C  `abcdefghijklmno

1856        : 73727170  77767574  7B7A7978  7F7E7D7C  pqrstuvwxyz{|}~.

1872        : 83828180  87868584  8B8A8988  8F8E8D8C  ................

1888        : 93929190  97969594  9B9A9998  9F9E9D9C  ................

1904        : A3A2A1A0  A7A6A5A4  ABAAA9A8  AFAEADAC  ................

1920        : B3B2B1B0  B7B6B5B4  BBBAB9B8  BFBEBDBC  ................

1936        : C3C2C1C0  C7C6C5C4  CBCAC9C8  CDCECDCC  ................

1952        : D1D2D1D0  D5D6D5D4  DBDAD9D8  DFDEDDDC  ................

1968        : E1E2E1E0  E7E6E5E4  EBEAE9E8  EFEEEDEC  ................

1984        : F3F2F1F0  F7F6F5F4  FBFAF9F8  FFFEFDFC  ................

2000        : 03020100  07060504  0B0A0908  0F0E0D0C  ................

2016        : 13121110  17161514  1B1A1918  1F1E1D1C  ................

2032        : 23222120  27262524  2B2A2928  2F2E2D2C  !"#$%&'()*+,-./

2048        : 33323130  C8C9CACB  C4C5C6C7  C0C1C2C3  0123............

0 Kudos
1,053 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

So far, we found a document issue at Kinetis 120MHz NFC module.

The NFC_RAR with the incorrect bit position for RB and CS, please check below picture for the detailed info:

NFC_RAR.png

Sorry for the document issue may cause any inconvenience to you.

Thank you for the attention.


Have a great day,
best regards,

Ma Hui

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

0 Kudos
1,053 Views
bowerymarc
Contributor V

when will you issue an errata with this change, as it directly contradicts the reference manual?

0 Kudos
1,053 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Marc,

That will be ok to post a notification at reference manual.

I will forward related info to Kinetis document team.

Thank you for the comments.

best regards,

Ma Hui

0 Kudos
1,053 Views
bowerymarc
Contributor V

Hi Hui Ma,

Again, I have found that you can NOT use both [RB1] and [RB0] in NFC_RAR when using CE1.  I found that if you do that during a block erase, you erase BOTH of your NAND chips at that block.

Regards,

Marc

0 Kudos