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.

RTOS/TMS320F280049C: Setting up the SYSBIOS PLL Clock to persist

Part Number: TMS320F280049C
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS


Hi,

I am having problems configuring the PLL clock on our SYSBIOS project so that the settings persist on the board.
Currently I'm using the 280049C control card.
I use the following settings in our non-sysbios project:

InitSysPll(XTAL_OSC, IMULT_10, FMULT_0, PLLCLK_BY_2);



I had tried using the .cfg settings to set this, which appeared to work at first but became eratic after cleaning/rebuilding the project, power cycling the board, etc.

Basically an LED task that would run at 3s would start taking 5 to 20 times that timeframe to act.

After reading that the PLL shouldn't be configured via SYSBIOS, I tried adding this in a reset function, but with no luck as the code would go off into the reset /Boot Rom and get stuck.
Can someone identify the settings that I should be making to get this to work?

In my main.c I have this function:

void resetFxn(void)
{
   InitSysPll(XTAL_OSC, IMULT_10, FMULT_0, PLLCLK_BY_2);
}

And in my .cfg

Startup.resetFxn = "&resetFxn";

Also I tried

Reset = xdc.useModule('xdc.runtime.Reset');
Reset.fxns[Reset.fxns.length++] = '&resetFxn';

But this also gets stuck in a similar memory space (Boot Rom between 0x3F0000 and 0x3FFFFF).

My .cmd file has the following related settings

MEMORY
{
PAGE 0 :
   RESET            : origin = 0x3FFFC0, length = 0x000002
   VECTORS          : origin = 0x3FFFC2, length = 0x00003E
}

SECTIONS
{
   .reset           : > RESET                PAGE = 0, TYPE = DSECT
}

Thanks for your help,

-Wes

  • As a test, can you temporarily comment out the call to InitSysPll() and do __asm(" ESTOP0") instead just to make sure that the function is being called? If it is being called, I'm wondering if maybe you're getting a watchdog reset? It can take a little while to lock the PLL. Try disabling the watchdog before calling InitSysPll() or editing the function to service it while waiting for the PLL to lock. If that doesn't help, load the boot ROM symbols and see where you're getting stuck.

    It looks like the reset hook function is called before the ti_catalog_c2800_initF2837x_Boot_init() function that is generated by SYS/BIOS to configure the PLL, so if the SYS/BIOS PLL configuration isn't completely disabled, it could be overwriting your configuration. Did you make sure Boot.configureClocks was set to false?

    Whitney
  • Hi Whitney,

    My coworker found a working setup. Instead of placing the InitSysPLL call within the reset function, he left it in the main function before the BIOS_Start call. This was causing us to see an unplugged interrupt #19 which was indicating an illegal function call. After tracing that down, he found that if we comment out the F28x_usDelay call within the PollX1Counter function related to the InitSysPLL for the 28004x driver code base then everything works as expected. Apparently this was the illegal function call. Since the comment in the code indicates that this is just a 1ms wait for the XTAL oscillator to power up, I think that it is safe for us to do this as we can delay this in other ways if necessary.

    Thanks,
    -Wes
  • Yes, that will work. Just as a note, issues with the usDelay function are usually related to missing the memcpy for the ramfuncs section that the function is stored in. Take a look at the InitSysCtrl() function (same file as InitSysPLL()) for an example if you decide you want to fix it.

    Whitney
  • Thanks Whitney. That was it. Another thing that should have been ported over.