各位专家好
我们在一家公司做毕设,主板是公司自己设计的,使用的是AM3505的处理器,搭载一片32M SDRAM, 型号是IS43DR16160A-5BBLI,我们自己写了初始化该内存的代码,但是好像不能工作,调试的时候代码不能下载到内存中, 实在是找不出哪里有问题了,以下是我的内存初始化代码,求各位专家指正。附件里有内存的datasheet
# Configure EMIF to Access Micron DDR2
#Step1: Setup DDR PHY control registers
0x6D0000E4 = 0x04 #DDR_PHY_CTRL_1
0x6D0000E8 = 0x04 #DDR_PHY_CTRL_1_SHDW
0x6D0000EC = 0x0 # DDR_PHY_CTRL_2
# Step2: Reset the PHY (using IODFT_TLGC) and wait till complete
0x6D000060 = 0x2411 #IODFT_TLGC
sleep 20
#Step3: Configure EMIF
#3.1 Setup timing registers (SDRAM_TIM_xxx)
0x6D000018 = 0x04447289 #SDRAM_TIM_1
0x6D00001C = 0x04447289 #SDRAM_TIM_1_SHDW
0x6D000020 = 0x141031CA #SDRAM_TIM_2
0x6D000024 = 0x141031CA #SDRAM_TIM_2_SHDW
0x6D000028 = 0xE7 #SDRAM_TIM_3
0x6D00002C = 0xE7 #SDRAM_TIM_3_SHDW
#3.2 Setup Power control reg (PWR_MGMT_CTRL)
0x6D000038 = 0x80000000 #PWR_MGMT_CTRL
0x6D00003C = 0x80000000 #PWR_MGMT_CTRL_SHDW
#3.3 Setup refresh rate (SDRAM_REF_CTRL)
0x6D000010 = 0x618 #SDRAM_REF_CTRL
0x6D000014 = 0x618 #SDRAM_REF_CTRL_SHDW
3.4 Setup SDRAM configuration register (SDRAM_CONFIG)
0x6D000008 = 0x40804C21 #SDRAM_CONFIG
内存的电路图如下:
Fangbo Xu:
不好意思,电路图不清楚,这个比较清楚
Yaoming Qin:
回复 Fangbo Xu:
你到底是用什么方式下载代码的呢,能具体说说么?