AnsweredAssumed Answered

MPC8308:DDR2 memory space overlapped

Question asked by gengdong Wan on Jun 6, 2013
Latest reply on Jun 6, 2013 by Marius Grigoras

I meet a problem about the memory access when I do some develop job on my own board based on mpc8308.
Below is the detail description.

Hardware Environment:
    DDR2:MT47H64M16HR(2 chips,256MBytes in total)
Note:The schematic will shows you that the connection between CPU and DDR2_Memory Device.

DDR2 initialize sequence as follows(Configure the registers associate with the DDR2 Memory Controller):

# DDR2 local access window 0 attribute regster (DDRLAWAR0)

lis  r5, 0x8000
ori  r5, r5, 0x001b
lis  r4, 0xe00000a4@ha
stw  r5, 0xe00000a4@l(r4)

#Chip Select Bounds Registers (CS0_BNDS)
lis  r5, 0x0000
ori  r5, r5, 0x000f
lis  r4, 0xe0002000@ha
stw  r5, 0xe0002000@l(r4)

After congiguring the DDR2 Memory controller as above,I found a strange problem when I do some memory access operations,the lower 128MB space is overlapped with the upper 128MB space,such as:

int * p = (int *)0x01000000;
      *p = 0x12345678;

after the operation above,I found the space 0x01000000 & 0x09000000 were filled with the same value(0x12345678).

(I guess becuz some steps of the configuration were wrong and it caused the MSB(bit27) of the address line of DDR2 doesn't work)

what causes this and why?please help me?

Thanks very much!