Correct SDRAM settings for LPC54018 and W9864G6KH-6I

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Correct SDRAM settings for LPC54018 and W9864G6KH-6I

ソリューションへジャンプ
3,016件の閲覧回数
mitchkapa
Contributor III

Is there documentation available that explains these settings so that I can modify them to match the SDRAM part W9864G6KH-6I?  Some of them I can match up with the SDRAM datasheet but others are less clear to me.  Also for using a new SDRAM component are these defines the only thing that needs to be changed?  Or are there other code changes required elsewhere?  Thanks.

#ifdef W9812G6JB6I
#define SDRAM_REFRESHPERIOD_NS (64 * 1000000 / 4096) /* 4096 rows/ 64ms */
#define SDRAM_TRP_NS (20u)
#define SDRAM_TRAS_NS (42u)
#define SDRAM_TSREX_NS (72u)
#define SDRAM_TAPR_NS (18u)
#define SDRAM_TWRDELT_NS (12u)
#define SDRAM_TRC_NS (60u)
#define SDRAM_RFC_NS (60u)
#define SDRAM_XSR_NS (67u)
#define SDRAM_RRD_NS (12u)
#define SDRAM_MRD_NCLK (2u)
#define SDRAM_RAS_NCLK (2u)
#define SDRAM_MODEREG_VALUE (0x33u)
#define SDRAM_DEV_MEMORYMAP (0x09u) /* 128Mbits (8M*16, 4banks, 12 rows, 9 columns)*/
#endif

0 件の賞賛
返信
1 解決策
2,973件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi mitchkapa 

For SDRAM general design, please refer

https://www.nxp.com.cn/docs/en/nxp/application-notes/AN12026.pdf

It includes SDRAM connections and PCB design.

Hope this helps,

Jun Zhang

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
3,008件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

 

MCUXpresso SDK has  emc_sdram demo code which demonstrates SDRAM usage. The demo code is for SDRAM W9812G6JB6I because this part equipped  on NXP EVB board.

We don't have same code for W9864G6KH-6I and I don't have this part for test. User needs to check W9864G6KH-6I manual to do necessary revision.

I found one thread, this customer use W9864G6KH-6I as well. Maybe you could refer it as well.

https://community.nxp.com/t5/LPC-Microcontrollers/LPC54018-SDRAM-W9864G6KH-has-problem/m-p/921456

Hope this helps,

Jun Zhang

 

0 件の賞賛
返信
2,993件の閲覧回数
mitchkapa
Contributor III

I was able to get my system working.  Part of my problem involved an incorrect value capacitor placed on the clock line.  But I do still believe better documentation for those SDRAM settings would be helpful.  Thanks.

0 件の賞賛
返信
2,974件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi mitchkapa 

For SDRAM general design, please refer

https://www.nxp.com.cn/docs/en/nxp/application-notes/AN12026.pdf

It includes SDRAM connections and PCB design.

Hope this helps,

Jun Zhang

0 件の賞賛
返信
3,005件の閲覧回数
mitchkapa
Contributor III

Hi, Jun, I did see that thread but unfortunately they do not say which values they used to get their system working.

I am OK with entering the values myself based on the datasheet but it would be helpful to have documentation describing these items so I know I am matching them up correctly with the datasheet.  Specifically these items I am not sure how to specify:

#define SDRAM_MODEREG_VALUE
#define SDRAM_DEV_MEMORYMAP

I think the SDRAM_DEV_MEMORYMAP for my device should be 0x05 but I am not positive on that.

0 件の賞賛
返信