Content originally posted in LPCWare by hiroto on Mon Sep 09 23:23:24 MST 2013 Hi. I'm testing now for Micron MT48LC32M16A2 on lpc1788 system, It is a 16bit 512Mbit SDRAM. No problem in the sequential write (increment pattern)of 64byte . problem occurs at a 65byte data write. But all data is abnormal by writing at 65 or later access. Please comment if there is a factor to be considered.
Content originally posted in LPCWare by studyembedded on Tue Oct 01 03:30:00 MST 2013 Hi Hiro, It nice that you manage to solve it, It would a great help to other people if you can share the code here. This is how the forums are run, my humble request to you is, Please share working code for the help of this community...thanks!
Content originally posted in LPCWare by hiroto on Mon Sep 30 22:48:26 MST 2013 Hi iamzhangyong and Everyone
My problem was solved. There seemed to implementation issues on the cause. Problem was solved where it is equipped with the same SDRAM remove the SDRAM, was soldered. Of course, from you about the SDRAM initialization Comment was very important. Thanks!!!
Content originally posted in LPCWare by hiroto on Mon Sep 23 20:53:53 MST 2013 Hi iamzhangyong!
Thanks for your comment! I have confirmed the behavior of LPC2478STK EVM at your help. Burst length of SDRAM parameters or would not come only involved in performance? Required tuning of burst length and Why?
Good, work properly below >> 0x33<<12.
Not good, it does not work properly below >> 0x32<<12.
Content originally posted in LPCWare by iamzhangyong on Thu Sep 19 07:30:03 MST 2013 Hi hiroto The difference of setting between 32bit and 16bit shows below 1)EMCDYNAMICCFG,This register you have modified for 16bit sdram. 2)SDRAM initalize command. volatile unsigned long Dummy = *(volatile unsigned short *)((Int32U)&SDRAM_BASE_ADDR + (0x32UL << (13)));This statement is in your software.I think it should be *(volatile unsigned int *)(...) to set 32bit SDRAM and *(volatile unsigned short *)(...) to set 16bit SDRAM.If the setting of 32bit SDRAM is 0x32 << 13,the 16bit may be 0x33<<12.The problem you got likes the data doesn't write to sdram,it just in the sdram buffer.When the data number you write pass 64 it can cause a burst write to sdram.The initalization of SDRAM doesn't work.So the data will be error.The EMCDLYCTL is a very important register to SDRAM controller.You should check up the register carefully.
Content originally posted in LPCWare by hiroto on Wed Sep 18 21:19:26 MST 2013 Hi iamzhangyong! and everyone!
I showing a result of the sample program on LPC2478 evaluation board (IAR LPC2478stk). LPC2478 evaluation board is used by the mapping of 32bit SDRAM. It's used two device(16bit SDRAM,K4S561632J-UC75x2) in fact. I confirmed good working in this 32bit environment. However, I confirmed the previous and similar problem at 16bit configuration.
I following the test results of three. What's missing？ How to use to a (single) SDRAM(16bit) ?
case 1: Expected with EMCDYNAMICCONFIG0 = 0x4680(32bit) case 2: Unexpeced with EMCDYNAMICCONFIG0 = 0x0680(16bit) case 3: Expected if access length is short with EMCDYNAMICCONFIG0 = 0x0680(16bit)
Content originally posted in LPCWare by iamzhangyong on Wed Sep 18 09:07:25 MST 2013 Hi hiroto! According to the datasheet the Buffer must be enable on sdram running,so I set the enable bit of the dynamicconfig register. Dummy = *((volatile unsigned short *)(0xA0000000 | (0x31<<13))); // RBC You set the SDRAM Burst Length to 2,but LPC1788 support Burst Length to be 8 at 16bit or 4 at 32bit.It is the problem?You can try Dummy = *((volatile unsigned short *)(0xA0000000 | (0x33<<13))); // RBC .This statement will initalise the sdram's burst length to 8
Content originally posted in LPCWare by hiroto on Tue Sep 17 00:28:40 MST 2013 Hi iamzhangyong
Thank you for your comment. However, it seems different from the problems you are encountering. the circuit I designed is a simple connection. (Or that of the LPC internal hardware?) I also when debugging, you access the SDRAM space with disable Buffer of EMC was the fault exception occurs . Does you set enable the Buffer?(EMCDynamicConfig0_bit.B = 1)
Content originally posted in LPCWare by iamzhangyong on Fri Sep 13 09:04:13 MST 2013 Dose it a hardware problem ? I design a board with LPC1788 and HY57V281620,it has problems random.The arm went to hardfault_handler.