先说配置环境: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文件)