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
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------