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.

CCS/TMS320F28377S: InitSysPll() debug get stuck !

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE,

Tool/software: Code Composer Studio

hi everyone,

I developed a can flash kernel code for f28377s. I used InitSysCtrl() routine but when I debug, the code get stuck  on the below code.

while(ClkCfgRegs.SYSPLLSTS.bit.LOCKS !=1 )

{

//ServiceDog()

}

How can I solve this problem ?

Thanks and Regards

  • Hi Hakan,

    Can you please provide more details especially on the arguments used for the InitSysPll() function?

     - what is the clock source, what is the frequency?

     - what is PLL multiplier?

     - what is the divider?

     - what is your target system clock?

     - which version of C2000Ware did you get the InitSysPll() from?

    Once you have these, we can try to isolate where the problem is...

    Thanks and regards,

    Joseph

  • Hi Josephi

    I am using c2000Ware last version ( 1.00.05.00 ). And also I am using F2837xS_SysCtrl.c to use InitSysCtrl() routine.

    I am not sure that these values are correct or not.
    The fractional multiplier is 0
    The integer multiplier is 40
    Clock source is XTAL_OSC 1
    Clock speed is 200MHz
    divsel is PLLCLK_BY_2 1

    And the debug get stuck at below code phase:

    while(ClkCfgRegs.SYSPLLSTS.bit.LOCKS !=1 )

    {

    //ServiceDog()

    }


    Thanks and Regards.

  • Hi Hakan,

    I do not see anything wrong with the arguments you are passing to the InitSysPll() function as long as you are using a 10Mhz XTAL (10MHz * 40 div 2 = 200Mhz) . What kind of board are you using and can you confirm the XTAL value(10MHz)? Also can you confirm in your setup that indeed the input clock is sourcing from XTAL (maybe check for the dip switch positions if any)?

    You will get into this error if you have incorrect XTAL value (maybe greater than 10Mhz if the multiplier is set to 40) or if there is no clock at all.

    Regards,
    Joseph
  • Hi Hakan,

    Just checking if you have made progress in your debug of this issue. Please let me know if you have resolved it or not.

    Thanks and regards,
    Joseph
  • Hi Joseph,

    I am so sorry for my late response !
    Actually, I didn't change any value in InitSysCtrl function also InitSysPll function. I am using the can_external_transmit example code's SysCtrl source file. This source file is working without any problem. I copied this source file into another project and this error occured. I can't solve it still.


    Thanks and Regards !

  • Hi Joseph,

    clock_source == ClkCfgRegs.CLKSRCCTL1.bit.OSCCLKSRCSEL and it uses XTAL_OSC.So, I think that there is a clock.

    ClkCfgRegs.SYSPLLMULT.all = ((fmult<<8U) | imult) ;
    The value of this phase is 40 when I debugged. I think that it's true.
  • Hi Hakan,

    On your board, is it possible to get a scope shot of the X1 pin? This is one way to confirm is there is indeed a clock that is going to the TMS320F28377S micro.

    Thanks and regards,
    Joseph
  • Hi Joseph,

    I am using Launch Xl f28377s.

    Thanks and Regards !
  • Hi Hakan,

    Ok, if you cannot probe the X1 pin on the Launchpad, you can try using one of the internal oscillators of the microcontroller.  In the InitSysPll function call, can you replace the XTAL_OSC argument with either INT_OSC1 or INT_OSC2.  These 2 internal oscillators are set to 10Mhz.  Do this so that PLL is sourced from internal clock.  See if your code still gets stuck on the InitSysPll function - this is just meant only to debug your issue.

    Thanks and regards,

    Joseph