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.

PLL initialization hung

Other Parts Discussed in Thread: TMS320C6678

Hello,

we're using a custom board with several TMS320C6678 DSP's.

 

Several of our programs are getting hung in PLL initialization.  As a check we ran the stock "client" NDK demo on our eval boards.  Every time, the program hangs by looping through these lines:


while (loopCount--) {

       asm("      NOP");

}

/*set pprst to 0 to deassert pll reset */

ctl = ctl & ~(1<<3);

(at this point the program jumps back to the assembly line) and keeps looping.  For what it's worth, the same exact code executes flawlessly in other programs.  Any idea what could be culprit?

 

Thanks!

  • Hi,

    What you mean by " For what it's worth, the same exact code executes flawlessly in other programs.  Any idea what could be culprit?" Can you elaborate a little mmore?

     

    thanks,

    Arun. 

  • Sure, basically, the top-level setup function, EVM_init(), sets up the sFlags structure in the same manner (pll=1, ddr=1, phy=1) in another program we have written.  This function calls platform_init() which then calls CorePllcGetHwSetup(); which is the function with the misbehaving code.  However, this same set of code (including the EVM_init(), platform_init(), and CorePllcGetHwSetup()) works just fine in another application and does not hang when initializing.

    I assume it must be something in the configuration since line-for-line code does not operate the same in two separate programs

    Thanks, Arun

  • You say it hangs on the While loop, can you check the value of loopCount?   There's nothing in the loop to get hung on, the only value it's checking is it's own counter.

  • actually it seems to ignore the while loop, it jumps from the "ctl = ctl & ~(1<<3);" line directly to the "asm("      NOP");", then back again to the "ctl = ctl & ~(1<<3);" line.  This cycle keeps looping.  Although I don't have the value in front of me, it was set to something like 80k (some random number like 82521), which does not appear to change once the loop is initiated.

  • Can you single step through the code in Assembly instead of C and determine what the execution is actually doing?  Occasionaly what you see stepping in C isn't fully representative of what's happening in Assembly do to optimization and the parallel function's.  Also, building w/ the -d option should help keep C and assembly stay in sync, but may result in lower performance.

    Best Regards,

    Chad