LPC2478 how to initialize a SDRAM

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

LPC2478 how to initialize a SDRAM

ソリューションへジャンプ
1,600件の閲覧回数
haoch
Contributor I

Hello,i change a SDRAM of 32M to a SDRAM of 4M ,i rewrite the code  as following ,but it still goes wrong, where else should i rewrite? TAHNKS

1.#define SDRAM_SIZE 0x00800000 //8M
//#define SDRAM_SIZE 0x02000000 // 32M

2. /* 64MB, 4Mx16, 4 banks, row=12, column=8 */
EMC_DYN_CFG0 = 0x00000280;
/* 256MB, 16Mx16, 4 banks, row=13, column=9 */

//EMC_DYN_CFG0 = 0x00000680;

3. dummy = *((volatile DWORD *)(SDRAM_BASE_ADDR | (0x33 << 11)));
// dummy = *((volatile DWORD *)(SDRAM_BASE_ADDR | (0x33 << 12))); //32M

0 件の賞賛
返信
1 解決策
1,323件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

Have you ensured that both memories are physically connected to the same base address? On your rewritten definitions, you have changed SDRAM_SIZE, but SDRAM_BASE_ADDR seems to be the same (just modifying the shift count).

Hope this will be useful for you.

Best regards!

/Carlos

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,324件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

Have you ensured that both memories are physically connected to the same base address? On your rewritten definitions, you have changed SDRAM_SIZE, but SDRAM_BASE_ADDR seems to be the same (just modifying the shift count).

Hope this will be useful for you.

Best regards!

/Carlos

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

0 件の賞賛
返信