采用的是MPC8245的开发板,开发板上四片SDRAM组成了64 bit data bus,读写SDRAM正常。
实验如下:将开发板的MDL[0]引脚通过1k的电阻接地,将其上电初始化配置成32 bit data bus模式。修改.cfg配置文件,将MCCR4[WMODE] =0b1,MCCR中的Bits 10–8 Burst length配成0b11,即burst length = 8.其余配置不变,本人认为只有这两处配置与32 bit data bus模式有关。加载配置文件,对SDRAM进行读写,观察到的SDRAM内存数据如下:0x25d03233,0x00000000,0x562234d8,0x00000000...
即地址0~3中的数据可读写,地址4~7中的数据始终是0,地址8~11中的数据可读写,地址12~15中的数据始终是0,以此类推。
将MDL[0]引脚的1k电阻悬空,重新配置成64 bit data bus模式,配置文件改回原样,SDRAM读写全部正常。
MPC8245 Integrated Processor Reference Manual中的P90页,2.2.2.9节中说:The MPC8245 can also be configured to operate with a 32-bit data bus on the memory interface by driving
the reset configuration signal MDL0 low during reset. When the MPC8245 is configured with a 32-bit data
bus, the bus operates in the same way as when configured with a 64-bit data bus, except that only
MDH[0:31] is used and MDL[0:31] can be left floating (except that it is driven by the MPC8245).
说明MPC8245是可以工作在32 bit data bus模式的。
MPC8245配置成32 bit data bus,读写SDRAM为什么工作不正常,硬件配置问题?还是配置文件问题?还是其压根不能工作在32 bit data bus模式?