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

c6748e JATG调试

大家好,我再使用JATG调试c6748e,现在使用串口解密JATG,JATG可以连上,如果只是运行hello work的话,JATG会保持良好的连接,但是运行实例时,刚运行完没事,一会就打印以下错误:

ICEPICK_C: Error: (Error -2172 @ 0x0) Unable to communicate with the emulator. Confirm emulator configuration and connections, reset the emulator, and retry the operation. (Emulation package 5.1.73.0)ICEPICK_C: Unable to determine target status after 20 attempts
ICEPICK_C: 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
C674X_0: JTAG Communication Error: (Error -2172 @ 0x0) Unable to communicate with the emulator. Confirm emulator configuration and connections, reset the emulator, and retry the operation. (Emulation package 5.1.73.0)C674X_0: 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

我加入断点,发现只要运行以下代码就出错了,希望大家帮帮忙,小白很郁闷。

psc1Regs->MDCTL[CSL_PSC_DDR2_MDDR] = CSL_FMKT( PSC_MDCTL_NEXT, ENABLE )
            | CSL_FMKT( PSC_MDCTL_LRST, DEASSERT );
    // move EMIFB PSC to Next state
    psc1Regs->PTCMD = CSL_FMKT( PSC_PTCMD_GO0, SET );

    // wait for transition
    while ((CSL_FEXT( psc1Regs->MDSTAT[CSL_PSC_DDR2_MDDR], PSC_MDSTAT_STATE )
            != CSL_PSC_MDSTAT_STATE_ENABLE)&& (timeoutCount > 0) ){
        timeoutCount–;
    }

Shine:

现在对PTCMD可以读写了?

在GEL文件中有对PSC初始化吗?

li sa:

回复 Shine:

现在还不可以对PTCMD写。读出来的一直都是默认值。用gel初始化的时候,都超时,我就在代码里初始化了。感觉好像有的寄存器不可以写似的,比如KICK0R ,KICK1R 写后读出来还是0,但是CFGCHIP3 却可以改变。
sys0Regs->KICK0R = 0x83e70b13;// Kick0 register + data (unlock)sys0Regs->KICK1R = 0x95a4f1e0;// Kick1 register + data (unlock)sys0Regs->CFGCHIP3 |= ((0 << 7) & 0x00000080);

gel的psc初始化是这样的:PSC0_LPSC_enable(0, LPSC_EDMA_CC0);PSC0_LPSC_enable(0, LPSC_EDMA_TC0);……

/*Enable Function for PSC0*/
PSC0_LPSC_enable(unsigned int PD, unsigned int LPSC_num) {unsigned int j;
if( (*(unsigned int*)(PSC0_MDSTAT+4 * LPSC_num) & 0x1F) != 0x3 ) {*(unsigned int*) (PSC0_MDCTL+4*LPSC_num) = (*(unsigned int*) (PSC0_MDCTL+4*LPSC_num) & 0xFFFFFFE0) | 0x0003;PSC0_PTCMD = 0x1<<PD;
j = 0;/*Wait for power state transition to finish*/while( (PSC0_PTSTAT & (0x1<<PD) ) !=0) {if( j++ > PSC_TIMEOUT ) {GEL_TextOut("\tPSC0 Enable Transition Timeout on Domain %d, LPSC %d\n","Output",1,1,1,PD,LPSC_num);break;}}
j = 0;while( (*(unsigned int*)(PSC0_MDSTAT+4 * LPSC_num) & 0x1F) !=0x3) {if( j++ > PSC_TIMEOUT ) {GEL_TextOut("\tPSC0 Enable Verify Timeout on Domain %d, LPSC %d\n","Output",1,1,1,PD,LPSC_num);break;}}}
}

赞(0)
未经允许不得转载:TI中文支持网 » c6748e JATG调试
分享到: 更多 (0)