EMC static external memory timing for LPC 407x

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

EMC static external memory timing for LPC 407x

1,469 Views
rene_benvenuti
Contributor II

Hi!

I’m trying to adjust the static delay values for one application that uses external Micron 29E04G08 NAND flash device with NXP LPC4078 EMC. I'm facing some random write errors on fwrite function that appears to be related with these delays.

Currently we are using the SYS_CLK set to 120MHz and EMC_CLK set to half of it, 60MHZ. The delays are as follows:

 

        LPC_EMC->StaticWaitWen0  = 0;        /* Delay from CS to WE                */

        LPC_EMC->StaticWaitOen0  = 0;        /* Delay from CS or addr change to RE */

        LPC_EMC->StaticWaitRd0   = 1;        /* Delay from CS to read access       */

        LPC_EMC->StaticWaitPage0 = 0;        /* Page Mode Read Delay               */

        LPC_EMC->StaticWaitWr0   = 1;        /* Delay from CS to write access      */

        LPC_EMC->StaticWaitTurn0 = 0;        /* Turn Round Delay                   */  

 

I could not found any guidance on how to program these values, neither examples for my processor. Please, could you help me elucidate how to get to these values?

There are also some EMC calibration on SYSCON. It is possible to use these calibration to get to the right delay values?

BR,

0 Kudos
Reply
4 Replies

1,392 Views
rene_benvenuti
Contributor II
0 Kudos
Reply

1,432 Views
rene_benvenuti
Contributor II

Hi XiangJun, 

Thanks for your reply!

Aswering your questions, I'm in fact using the MT29F8G08ADAFAWP NAND flash (annex datasheet) with the LPC 4078. 

I could not found any guidance on LPC 4078 datasheet or UM describing that the EMC can not be used with this kind of NAND memory. In fact, I'm already using it.

I'm not having problems with reading times, my question is about write times. I'm having some random sector write errors during my application operation. For these write times, did you suggest some specific delay?

BR,

Renê

 

 

 

0 Kudos
Reply

1,449 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding your question, I think the EMC of LPC407x can NOT connect to the external Micron 29E04G08 NAND flash device, the EMC can connect to asynchronous SRAM, NOR flash, SDRAM, but it can not connect to NAND flash. Pls check if the Micron 29E04G08 is NOR flash or NAND flash, if it is NOR flash, could you post the data sheet?

Secondly, I suppose that you connect NOR flash, in the case, I suggest you refer to the section 11.2 External memory interface in data sheet of LPC407x, which I attached.

For example, this is the reading figure:

xiangjun_rong_0-1612683649734.png

For the reading timing, pls check RD2 and RD4.

xiangjun_rong_1-1612683798519.png

 

so pls try to use the spec for reading, and check if there is issue for reading. For the writing spec, pls check yourself.

LPC_EMC->StaticWaitOen0 = 1; /* Delay from CS or addr change to RE */

LPC_EMC->StaticWaitRd0 = 4; /* Delay from CS to read access */

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply

1,423 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you know that the user manual of LPC40xx does not mention that the EMC supports NAND flash, maybe it supports nand flash.

Pls refer to the community link for the nand flash support.

https://community.nxp.com/t5/LPC-Microcontrollers/NAND-Flash-interface-support-in-LPC4367/m-p/753339

 

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply