TI中文支持网
TI专业的中文技术问题搜集分享网站

DM368应用起来后板子反复重启

DDR2: H5PS1G63EFR-S5C 128M

参照手册配的参数,目前内核起来后还算稳定。 但是应用也起来后,基本上板子就会很快重启,目前很多板卡都是这种情况。

怀疑是内存不稳定导致。但是参照DDR2手册的参数各种尝试后,问题一直没有解决。求给些建议,谢谢。

UBL版本1.65.  DDR初始化部分参照UBL1.5配的。思路是UBOOT阶段没有配DDR,那就是BUL阶段DDR参数配的不合适,导致应用起来后反复复位,所以一直在尝试配不同的参数。DDR2默认配的是340Mhz的时钟,所以一直主要在手册的DDR2-667这个配置下,尝试不同的参数,有的时候也会尝试DDR2-800和DDR2-533的配置。

代码如下:

static const Uint16 DDR_T_RFC = 1275;
static const Uint16 DDR_T_RP = 150;//125 + 1tck
static const Uint16 DDR_T_RCD = 150;
static const Uint16 DDR_T_WR = 150;
static const Uint16 DDR_T_RAS = 450;
static const Uint16 DDR_T_RC = 600;
static const Uint16 DDR_T_RRD = 100;
static const Uint16 DDR_T_WTR = 75;//tWTR is at least two clocks (2 x tCK or 2 x nCK)
static const Uint32 DDR_T_RASMAX = 700000;
static const Uint16 DDR_T_XP = 2;
static const Uint16 DDR_T_XSNR = 1375;
static const Uint16 DDR_T_XSRD = 200;
static const Uint16 DDR_T_RTP = 75;
static const Uint16 DDR_T_CKE = 3;
static const Uint16 DDR_RR = 78;

DDR->DDRPHYCR = 0x000000C5;

DDR->SDBCR = 0x534832;
DDR->SDBCR = 0x53C832; // 0x53C832; Set the TIMUNLOCK to write into the TMR reg

tRFC = DDR_Get_Val(DDR_T_RFC, DDR_FREQ);
tRP = DDR_Get_Val(DDR_T_RP, DDR_FREQ);
tRCD = DDR_Get_Val(DDR_T_RCD, DDR_FREQ);
tWR = DDR_Get_Val(DDR_T_WR, DDR_FREQ);
tRAS = DDR_Get_Val(DDR_T_RAS, DDR_FREQ);
tRC = DDR_Get_Val(DDR_T_RC, DDR_FREQ);
tRRD = DDR_Get_Val(DDR_T_RRD, DDR_FREQ);
tWTR = DDR_Get_Val(DDR_T_WTR, DDR_FREQ);

DDR->SDTIMR = tRFC << 25 | tRP << 22 |
tRCD << 19 |
tWR << 16 |
tRAS << 11 |
tRC << 6 |
tRRD << 3 |
tWTR << 0;
DDR->SDTIMR2 = (DDR_T_RASMAX / (DDR_RR * DDR_FREQ) << 27) |
(DDR_T_XP << 25 ) |
(((DDR_T_XSNR * DDR_FREQ) / 10000) << 16) |
(DDR_T_XSRD << 8) |
(((DDR_T_RTP * DDR_FREQ) / 10000) << 5) | (DDR_T_CKE << 0);

DDR->SDBCR = 0x534832; //0x534832; Reset the TIMUNLOCK TMR Write Disable

DDR->PBBPR = 0x000000FE;

DDR->SDBCR = 0xD34A32; //Enable DDR2 and DDR and SDram. Write '1' to BOOTUNLOCK

DDR->SDBCR = 0x534A32; //Enable DDR2 and DDR and SDram. Write '0' to BOOTUNLOCK

DDR->SDRCR = (DDR_RR * DDR_FREQ) / 10; //Program SDRAM Refresh Control Registers

手册部分参数如下:

Chris Meng:

你好,

你使用的芯片后缀S5,表示是DDR800的芯片。所以在配置的时候,时序上的参数要选择DDR芯片手册上DDR800的数据,而不是使用DDR实际在板上跑的频率。

请问你的参数配是否有参考使用下论坛里面的表格?

http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/p/69143/167093.aspx

如果怀疑是DDR的问题,你可以尝试配置DDR的频率(DM36x上DDR相关PLL)为270Mhz,216Mhz,171.8Mhz,看看是否就稳定些?

赞(0)
未经允许不得转载:TI中文支持网 » DM368应用起来后板子反复重启
分享到: 更多 (0)