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.

TMS320C6713B: 软件配置PLL初始化程序reset

Part Number: TMS320C6713B


您好!我在上电后软件初始化PLL相关寄存器时程序复位,所有PLL寄存器: 都是可以正常读写,为了验证是不是我的参数设置错误导致复位,我将默认的PLL所有寄存器值读出,然后将寄存器的原始参数重新写进去,但是再最后使能PLL的时候程序跑飞并复位了,如下图:

我的具体配置步骤如下:

void pLL_Init(void)
{
/* Initialize PLL Registers */
/* Put PLL in bypass */
PLL_bypass();
PLLdelay(20);

/* Reset PLL */
PLL_reset();
PLLdelay(20);

/* Set main multiplier/divisor */
PLLdelay(20);
PLL_RSET(PLLM,7); //25MHz×18=450MHz
PLLdelay(20);
PLL_RSET(OSCDIV1, PLL_OSCDIV1_RMK(1, 7)); //25MHz/2=12.5MHz(CLKOUT3)
PLLdelay(20);
PLL_RSET(PLLDIV0, PLL_PLLDIV0_RMK(1, 0)); //450MHz/1=450MHz
PLLdelay(20);
/* Set DSP clock */
PLL_RSET(PLLDIV1,PLL_PLLDIV1_RMK(1, 0)); //450MHz/2=225MHz
PLLdelay(20);

/* Set peripheral clock */
PLL_RSET(PLLDIV2,PLL_PLLDIV2_RMK(1, 1)); //450MHz/4=112.5MHz(CLKOUT2)
PLLdelay(20);

/* Set EMIF clock */
PLL_RSET(PLLDIV3,PLL_PLLDIV3_RMK(1, 1)); //450MHz/5=90MHz(ECLKOUT)
PLLdelay(20);

/* Take PLL out of reset */
PLL_deassert();
PLLdelay(1500);
PLLdelay(1500);
/* Enalbe PLL */
PLL_enable();
PLLdelay(20);
}

如果是晶振有问题的话应该连仿真都进不了。

请TI工程师帮忙解答一下,谢谢。

  • 请问红框中的PLL_enable函数是在运行PLL_Init 运行后,再去调用的吗?

    如果在runtime重新去配置PLL的话,要先把PLL配置成bypass mode再去配置PLL寄存器。请看下面数据手册上的说明。
    The settings for the PLL multiplier and each of the dividers in the clock generation block may be reconfigured via software at run time. If either the input to the PLL changes due to D0, CLKMODE0, or CLKIN, or if the PLL multiplier is changed, then software must enter bypass first and stay in bypass until the PLL has had enough time to lock (see electrical specifications). For the programming procedure, see the TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide (literature number SPRU233).
    https://www.ti.com/lit/ds/symlink/tms320c6713b.pdf