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.

Concerto F28M35H52C1 M3 PLL startup problem

I have the Concerto F28M35H52C1 on a custom board. The problem is that the M3 core doesn't start up correctly every time.

From testing, on a bad start the PLL fails and it drops back to the internal 10MHz clock. I am trying to run the M3 at 75MHZ and the C28 at 150 MHz.

The code im using to start the clock as follow:

SysCtlClockConfigSet(SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xF) | SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_XCLKDIV_4);

Is there some example code of using/config the clocks and using the "Missing Clock" control that it talks about in the reference manual 1.6.2 and figure 1-10, page 128. The top box of the figure talks about "software programs refclk limit register"

Some kind of looping sturcture until the crystal is ready for the clock and setting the limits correctly ??

Thanks

Greg

  • Hi Greg,

    Please use following code in start of your application -

           // Disable Protection

           HWREG(SYSCTL_MWRALLOW) =  0xA5A5A5A5;

          //check missing clock flag; initiate WD reset if flag is true

           if ((HWREG(SYSCTL_MCLKSTS) & SYSCTL_MCLKSTS_MCLKFLG) == SYSCTL_MCLKSTS_MCLKFLG)

             {

                   SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);    //enable WD peripheral

                  IntDisable(INT_WATCHDOG);                       //disable WD interrupt

                  WatchdogUnlock(WATCHDOG0_BASE);                 //unlock WD

                  WatchdogReloadSet(WATCHDOG0_BASE, 20);          //set timer to 20 cycles

                  WatchdogResetEnable(WATCHDOG0_BASE);            //enable WD to force reset

                  WatchdogEnable(WATCHDOG0_BASE);                 //enable WD

                   int i = 0;                                      //initialize counter value

                  for(i=0;i<12345;i++);                           //stay in this function

             }

    This will basically fire a WD reset if there is a missing clock because crystal is not ready. Hope this solves the issue.

    Regards,

    Vivek Singh

  • Thank you

    The code seems to be working and the M3 has been starting correctly.

    Greg