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

AM335X的Starterware调试问题

先说配置环境:win7 64bit+AM335X_StarterWare_02_00_01_01+CCS6+XDS100V3仿真器

板子是米尔科技的MYD_Y335X开发板,使用的AM3358处理器,256M DDR3L

在使用ccsv6\ccs_base\emulation\boards\sk_am3358\gel\AM3358_StarterKit_Rev1_2.gel作为配置文件进行仿真时提示错误如下:

CortxA8: Output: **** AM3358_SK Initialization is in progress ……….CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress ………CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz
CortxA8: Output: **** Going to Bypass…CortxA8: Output: **** Bypassed, changing values…CortxA8: Output: **** Locking ARM PLL
CortxA8: Output: **** Core Bypassed
CortxA8: Output: **** Now locking Core…
CortxA8: Output: **** Core locked
CortxA8: Output: **** DDR DPLL Bypassed
CortxA8: Output: **** DDR DPLL Locked
CortxA8: Output: **** PER DPLL Bypassed
CortxA8: Trouble Writing Memory Block at 0x44e0048c on Page 0 of Length 0x4: (Error -1141 @ 0x3D58) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)
CortxA8: GEL: Error while executing OnTargetConnect(): Target failed to write 0x44E0048C
at *((unsigned int *) (0x44E00000+0x48C))=(unsigned int) clkmode [AM3358_StarterKit_Rev1_2.gel:282]
at PER_PLL_Config(CLKIN, 23, 960, 5) [AM3358_StarterKit_Rev1_2.gel:456]
at ARM_OPP100_Config() [AM3358_StarterKit_Rev1_2.gel:370]
at AM3358_SK_Initialization() [AM3358_StarterKit_Rev1_2.gel:356]
at OnTargetConnect()
CortxA8: Trouble Reading Register CP15_Registers.CP15_CONTROL_REGISTER: (Error -1141 @ 0x3D58) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Trouble Reading Register CP15_Registers.CP15_CONTROL_REGISTER: (Error -1141 @ 0x3D58) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Trouble Reading Memory Block at 0x233f0 on Page 0 of Length 0xc: (Error -1205 @ 0x233F0) Device memory bus has an error and may be hung. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Trouble Reading Memory Block at 0x233f0 on Page 0 of Length 0x94: (Error -2130 @ 0x233F0) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Trouble Reading Memory Block at 0x233f0 on Page 0 of Length 0xc: (Error -2130 @ 0x233F0) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Trouble Reading Memory Block at 0x233f0 on Page 0 of Length 0x6c: (Error -2130 @ 0x233F0) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)CortxA8: Unable to determine target status after 20 attempts
CortxA8: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

错误出在读写0x44e0048c这个寄存器,查看了一下该gel文件,错误的发生应该就出在下面标红的位置:

PER_PLL_Config(UWORD32 CLKIN,UWORD32 N,UWORD32 M,UWORD32 M2)
{
UWORD32 ref_clk,clk_out = 0;
UWORD32 clkmode,clksel,div_m2,idlest_dpll;

ref_clk = CLKIN/(N+1);
clk_out = (ref_clk*M)/M2;

clkmode=RD_MEM_32(CM_CLKMODE_DPLL_PER);
clksel= RD_MEM_32(CM_CLKSEL_DPLL_PER);
div_m2= RD_MEM_32(CM_DIV_M2_DPLL_PER);

clkmode =(clkmode&0xfffffff8)|0x00000004;
WR_MEM_32(CM_CLKMODE_DPLL_PER,clkmode);
while((RD_MEM_32(CM_IDLEST_DPLL_PER) & 0x00000100 )!=0x00000100);

GEL_TextOut("**** PER DPLL Bypassed\n","Output",1,1,1);

clksel = clksel & (~0x7FFFF);
clksel = clksel | ((M <<0x8) | N);
WR_MEM_32(CM_CLKSEL_DPLL_PER,clksel);
div_m2= 0xFFFFFF80 | M2;
WR_MEM_32(CM_DIV_M2_DPLL_PER,div_m2);
clkmode =(clkmode&0xfffffff8)|0x00000007;
WR_MEM_32(CM_CLKMODE_DPLL_PER,clkmode);

while((RD_MEM_32(CM_IDLEST_DPLL_PER) & 0x00000001 )!=0x00000001);

GEL_TextOut("**** PER DPLL Locked\n","Output",1,1,1);
}

很奇怪为什么会出现这样的时钟配置错误?AM3358的系统时钟配置(不含DDR时钟配置)应该都是一样的吧?这个错误跟选择的gel文件应该不相关吧?(其他gel文件中的DDR有的是DDR2的,有的是DDR3的512M的,故没选也没试)。请大家帮帮忙,谢谢啦!(附件中就是我选的那个gel文件)

Wei Gao11:

多次尝试,发现每次出现错误的地方并不一定相同,但错误基本上都出在时钟配置上。。。

Steven Liu1:

你现在运行的这个gel文件是为了给我们的官方AM3358_StarterKit开发板做初始化用的。

也就是说他的DDR3的配置都是针对于AM3358_StarterKit EVM上的DDR3参数和相关的走线长度来设计的,而你实际跑的板子是米尔科技的,你需要确认米尔科技的相关DDR3配置是否和STARTERKIT的板子完全一致,若不一致,肯定是会初始化失败的。

PS:米尔科技的板子在发布前应该是已经调试好的,所以他的DDR3是跑在400M还是303M,配置的相关参数是怎样都应该是定下来的,相应的GEL也应该由他们直接提供给你,你可以在他的官网或者论坛上找找,应该有现成的GEL文件才对。

Wei Gao11:

回复 Steven Liu1:

感谢Steven的回复!我多次尝试,发现错误每次基本都不在一个位置:比如附件中debug错误记录中,第一次是:

CortxA8: Output: ****  AM3358_SK Initialization is in progress ……….

CortxA8: Output: ****  AM335x ALL PLL Config for OPP == OPP100 is in progress ………

CortxA8: Output: Input Clock Read from SYSBOOT[15:14]:  24MHz

CortxA8: Output: ****  Going to Bypass…

CortxA8: Output: ****  Bypassed, changing values…

CortxA8: Output: ****  Locking ARM PLL

CortxA8: Output: ****  Core Bypassed

CortxA8: Output: ****  Now locking Core…

CortxA8: Output: ****  Core locked

CortxA8: Output: ****  DDR DPLL Bypassed

CortxA8: Output: ****  DDR DPLL Locked

CortxA8: Output: ****  PER DPLL Bypassed

CortxA8: Output: ****  PER DPLL Locked

CortxA8: Output: ****  DISP PLL Config is in progress ……….

CortxA8: Output: ****  DISP PLL Config is DONE ……….

CortxA8: Output: ****  AM335x ALL ADPLL Config for OPP == OPP100 is Done ………

CortxA8: Output: ****  AM335x DDR3 EMIF and PHY configuration is in progress…

CortxA8: Output: EMIF PRCM is in progress …….

CortxA8: Output: EMIF PRCM Done

CortxA8: Output: DDR PHY Configuration in progress

CortxA8: Output: Waiting for VTP Ready …….

CortxA8: Output: VTP is Ready!

CortxA8: Output: DDR PHY CMD0 Register configuration is in progress …….

CortxA8: Trouble Writing Memory Block at 0x44e1202c on Page 0 of Length 0x4: (Error -1141 @ 0x3D58)

第二次是:

CortxA8: Output: ****  AM3358_SK Initialization is in progress ……….

CortxA8: Output: ****  AM335x ALL PLL Config for OPP == OPP100 is in progress ………

CortxA8: Output: Input Clock Read from SYSBOOT[15:14]:  24MHz

CortxA8: Output: ****  Going to Bypass…

CortxA8: Output: ****  Bypassed, changing values…

CortxA8: Output: ****  Locking ARM PLL

CortxA8: Trouble Reading Memory Block at 0x44e00420 on Page 0 of Length 0x4: (Error -1205 @ 0x44E00420) 

第三次是:

CortxA8: Output: ****  AM3358_SK Initialization is in progress ……….

CortxA8: Output: ****  AM335x ALL PLL Config for OPP == OPP100 is in progress ………

CortxA8: Output: Input Clock Read from SYSBOOT[15:14]:  24MHz

CortxA8: Output: ****  Going to Bypass…

CortxA8: Output: ****  Bypassed, changing values…

CortxA8: Output: ****  Locking ARM PLL

CortxA8: Output: ****  Core Bypassed

CortxA8: Output: ****  Now locking Core…

CortxA8: Output: ****  Core locked

CortxA8: Output: ****  DDR DPLL Bypassed

CortxA8: Output: ****  DDR DPLL Locked

CortxA8: Output: ****  PER DPLL Bypassed

CortxA8: Output: ****  PER DPLL Locked

CortxA8: Output: ****  DISP PLL Config is in progress ……….

CortxA8: Output: ****  DISP PLL Config is DONE ……….

CortxA8: Output: ****  AM335x ALL ADPLL Config for OPP == OPP100 is Done ………

CortxA8: Output: ****  AM335x DDR3 EMIF and PHY configuration is in progress…

CortxA8: Trouble Writing Memory Block at 0x44e07130 on Page 0 of Length 0x4: (Error -1141 @ 0x3D58) 

第四次是:

CortxA8: Output: ****  AM3358_SK Initialization is in progress ……….

CortxA8: Output: ****  AM335x ALL PLL Config for OPP == OPP100 is in progress ………

CortxA8: Trouble Reading Memory Block at 0x44e10040 on Page 0 of Length 0x4: (Error -1205 @ 0x44E10040)

我使用的仿真器XDS100V3是淘宝店买的,14pin接口中有意义的是:TRSTn、TDI、TMS、TCK、TDO、+3.3V、GND、TCK-RET、EMU0和EMU1,而米尔科技的开发板的JTAG口只引出了如下7pin:TRSTn、TDI、TMS、TCK、TDO、+3.3V和GND。于是我将仿真器上的TCK-RET、EMU0和EMU1这3个针悬空不接。不知这样是否影响调试?我在CCS6中Test Connection中(TCLK固定1MHz)每次都能测试通过,感觉又不像是JTAG仿真器没连接好的问题。还望指教,不甚感激!

Jian Zhou:

回复 Wei Gao11:

建议你先和米尔科技那边确认下,他们的JTAG能不能用。

赞(0)
未经允许不得转载:TI中文支持网 » AM335X的Starterware调试问题
分享到: 更多 (0)