This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6748 加载 gel 失败

Other Parts Discussed in Thread: TPS650061

在 CCS 5.2.1 中用 xds560-plus 仿真器加载 附件的 gel 时出现错误:

C674X_0: Output:     ---------------------------------------------
C674X_0: Output:     PLL0 init done for Core:300MHz, EMIFA:25MHz
C674X_0: Output:     DDR initialization is in progress....
C674X_0: Trouble Reading Memory Block at 0x1c14188 on Page 0 of Length 0x4: (Error -1178 @ 0x1C14188) Device functional clock appears to be off. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.747.0)
C674X_0: GEL: Error while executing OnTargetConnect(): target access failed     at (*((unsigned int *) (0x01C14000+0x188))&=~(0x00000020)) [C6748_LCDK.gel:228]     at device_PLL1(24, 1, 0, 1, 2) [C6748_LCDK.gel:406]     at Set_DDRPLL_150MHz() [C6748_LCDK.gel:424]     at Set_DDR2_150MHz() [C6748_LCDK.gel:459]     at Core_300MHz_mDDR_150MHz() [C6748_LCDK.gel:245]     at OnTargetConnect() .

核心板的设计跟 ti 官方的 lcdk 是一样的。这个问题应该从什么地方着手去解决?谢谢了啊。

Lcdk_ccs_gel.zip
  • 先根据上面的提示,在targetconfiguration中把TCLK的频率调低一下试试

  • TCLK的频率也调过,调到最小还是一样的问题。

    调试发现是 gel 里面 device_PLL0() 执行完之后,仿真器就连接不上板子了。

    用 gel 里面最低频率的配置也是同样的问题。

  • 因为这是你自己做的板子,不知在不加载GEL的情况下,不使用工程,直接从targetconfiguration中调试,板子和仿真器是否能够正常连接,进入debug模式呢?

  • 不加载 GEL 的情况下,可以连接到板子上进入debug模式。

  • 那你的板子和evm板之间有什么区别吗?GEL文件的配置是和EVM板匹配的。

  • 核心部分跟 evm 是一样的。您可以给我一个邮箱,我可以把原理图发给您,帮我review一下,找找原因,谢谢。

  • 您好,不加载gel,连接上板子。然后使用工程来调试DDR,DDR有问题吗?

  • 不加载 gel 的话,不配置 pll0 能调试 ddr 吗?能告诉我具体该怎么操作吗?谢谢!

  • 你好,在程序开头配置PLL,DDR等啊,不加载GEL也可以调试dsp。

  • 配置完 PLL0 ,仿真器就连不上了。就如 gel 中 device_PLL0() 中的配置一样。

    配置 PLL0 有没有什么需要特别注意的地方?

  • 配置PLL的话,你可以参考http://www.ti.com/lit/ug/spruh79a/spruh79a.pdf

    7.2.2 Steps for Programming the PLLs

  • 下面这段代码:

    device_PLL0(unsigned int CLKMODE, unsigned int PLLM, unsigned int POSTDIV,unsigned int PLLDIV1, unsigned int PLLDIV2, unsigned int PLLDIV3, unsigned int PLLDIV7 ) {

    unsigned int i=0;

    /* Clear PLL lock bit */
    CFGCHIP0 &= ~(0x00000010);

    /* Set PLLENSRC '0',bit 5, PLL Enable(PLLEN) selection is controlled through MMR */
    PLL0_PLLCTL &= ~(0x00000020);

    /* PLLCTL.EXTCLKSRC bit 9 should be left at 0 for Freon */
    PLL0_PLLCTL &= ~(0x00000200);

    /* Set PLLEN=0 to put in bypass mode*/
    PLL0_PLLCTL &= ~(0x00000001);

    /*wait for 4 cycles to allow PLLEN mux switches properly to bypass clock*/
    for(i=0; i<PLLEN_MUX_SWITCH; i++) {;}

    /* Select the Clock Mode bit 8 as External Clock or On Chip Oscilator*/
    PLL0_PLLCTL &= 0xFFFFFEFF;
    PLL0_PLLCTL |= (CLKMODE << 8);

    /*Clear PLLRST bit to reset the PLL */
    PLL0_PLLCTL &= ~(0x00000008);

    /* Disable the PLL output*/
    PLL0_PLLCTL |= (0x00000010);

    /* PLL initialization sequence
    Power up the PLL by setting PWRDN bit set to 0 */
    PLL0_PLLCTL &= ~(0x00000002);

    /* Enable the PLL output*/
    PLL0_PLLCTL &= ~(0x00000010);

    /*PLL stabilisation time- take out this step , not required here when PLL in bypassmode*/
    for(i=0; i<PLL_STABILIZATION_TIME; i++) {;}

    /*Program the required multiplier value in PLLM*/
    PLL0_PLLM = PLLM;

    /*If desired to scale all the SYSCLK frequencies of a given PLLC, program the POSTDIV ratio*/
    PLL0_POSTDIV = 0x8000 | POSTDIV;

    /*Check for the GOSTAT bit in PLLSTAT to clear to 0 to indicate that no GO operation is currently in progress*/
    while(PLL0_PLLSTAT & 0x1==1){}

    /*Program the RATIO field in PLLDIVx with the desired divide factors. In addition, make sure in this step you leave the PLLDIVx.DxEN bits set so clocks are still enabled (default).*/
    PLL0_PLLDIV1 = 0x8000 | PLLDIV1; // Fixed Ratio /1
    PLL0_PLLDIV2 = 0x8000 | PLLDIV2; // Fixed Ratio /2
    PLL0_PLLDIV4 = 0x8000 | (((PLLDIV1+1)*4)-1); // Fixed Ratio /4
    PLL0_PLLDIV6 = 0x8000 | PLLDIV1; // Fixed Ratio /1
    PLL0_PLLDIV3 = 0x8000 | PLLDIV3; // Variable Ratio (EMIF)
    PLL0_PLLDIV7 = 0x8000 | PLLDIV7; // Variable Ratio (RMII)


    /*Set the GOSET bit in PLLCMD to 1 to initiate a new divider transition.*/
    PLL0_PLLCMD |= 0x1;

    /*Wait for the GOSTAT bit in PLLSTAT to clear to 0 (completion of phase alignment).*/
    while(PLL0_PLLSTAT & 0x1==1) { }

    /*Wait for PLL to reset properly.*/
    for(i=0; i<PLL_RESET_TIME_CNT; i++) {;}

    /*Set the PLLRST bit in PLLCTL to 1 to bring the PLL out of reset*/
    PLL0_PLLCTL |= 0x8;

    /*Wait for PLL to lock.*/
    for(i=0; i<PLL_LOCK_TIME_CNT; i++) {;}

    // 在这里还可以还可以通过仿真器连接

    /*Set the PLLEN bit in PLLCTL to 1 to remove the PLL from bypass mode*/
    PLL0_PLLCTL |= 0x1;

    // 这之后仿真器就连接不上了
    }

    这有没有什么问题?

  • 因为上面的PLL配置在evm中可以正常的运行,说明你的板子时钟只能工作在bypass mode。建议你对比一下evm板,测量一下你的时钟电路和evm板有何异同。

  • PLL0 的 CLKMODE 的 0 和  1 这两种模式是怎么确定的?我 OSCIN 外接的24M晶振,应该是设置0还是1?

  • 看技术手册143页这里,有详细描述,使用晶振,CLKMODE 请置0

  • 您好 我也遇到了同样的问题,我的问题集中在执行 PLL0_PLLCTL &= ~(0x00000020);之后,dsp就会断开连接。

  • 这个问题的原因在于:

    #1. 可能CVDD不稳定,在配置PLL0后,芯片功耗会增大,导致CVDD波动,进而影响芯片的稳定性。从确定问题的角度,你可以把CVDD调高一点试试,比如1.3V。

    #2.  也可以把PLL0的输出频率设低一点试试,比如200MHz,甚至100MHz。看是不是有改善,我个人经验,一定是有改善的。

    #3. 跟仿真器也有一定关系,有的仿真器在这种情况下稳定性会好一些,比如blackhawk的XDS560,我最喜欢的是spectrum digital的XDS510,都是相对稳定一些的。

    另外从改善JTAG信号质量的角度,确认其上下拉电阻没有拉反。走线不要太长等等。

    主要还是第一,二条,你可以用示波观测在配置PLL0后使能的那一下,CVDD是不是有个跌落。

  • 首先要感谢您的细致的分析,我仔细看了你的建议,我也认为是CVDD不稳定的问题,或者使能PLL的时候拉低了电压。所以我用示波器检测过了,我CVDD给的是1.2V,用TPS650061电源芯片供电的,理论说可以带动这个负载,我把示波器触发值调到1.1V,然后使能PLL,CPU不工作的瞬间并没有电压的突变。

    另外仿真器信号版上走线长度也没有超过2cm,如果没有使用PLL,仿真器是稳定工作的,并且各个外设模块也都可以正常工作。

    但目前我仍然没有调到1.3V调试,因为我把频率降调300Mhz,200Mhz,甚至PLLM设置到2,仍然出现同样的问题,另外,无论CPU正常或者异常,测量24M无缘晶振的引脚是有波形的,我认为可以排除晶振本身的问题。现在我不能找到问题所在,还请劳烦您帮我指点一二。

  • #1. CVDD的测量可以把时间轴打大点,这样可以看到更长时间的波形,不至于一闪而过,也许没有跳变到1.1V那么多。

    #2. 还有要看在什么位置测的,应该尽量靠近DSP下面的电源管脚,在其过孔上测,不是在电源的输出端。

    #3. 再有示波器要用好一点的,不要限带宽。