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/TMS320F28027: External crystal

Part Number: TMS320F28027
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

   I am using C2000, Piccolo launch pad for TMS320F28027. I connected 20 MHz external crystal with 12 pf capacitor for Bluetooth and wifi module interface program. The problem I am facing is, when I debug through CCS, it is giving an error message. If I try many time, some time it debug and flash the program to the launch pad. Why this is happening, Do I need to make any changes in the CCS to incorporate the external crystal option? If I change the option to internal crystal, I am able to debug in first attempt itself. Please support me. I attached the screen shots.

Regards,

Mahesh R.K.

CCS.docx

  • Hi Mahesh,

    You're meaning you populated the external crystal in either Q1 or Q2 of the LaunchPad and altered C3/C4 values? Have you validated that the load capacitors used are appropriate for the crystal?

    You will need to configure the external clock source to be used within software. Are you able to load code OK for a RAM based project? Not certain if there's some setting you need to change for the flash load programmer to work with an external crystal.

    Best,

    Kevin

  • Hi Kevin,

       I have selected the crystal and the capacitor as per data sheet "3.7.2 Crystal Oscillator Option".

    I have changed in main below 

    //Select the external oscillator  as the clock source
    CLK_setOscSrc(myClk, CLK_OscSrc_External);

    // Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
    PLL_setup(myPll, PLL_Multiplier_6, PLL_DivideSelect_ClkIn_by_2);

    When I debug it is flashing and I am able to communicate Bluetooth module. 

    My problem is now and then I have to debug  4-10 times to flash. 4-10 times it will give the load error. If I use the internal oscillator, I never had this problem. So I believe this could be due to external oscillator. 

    Regards,

    Mahesh R.K.

  • Mahesh,

                  I suggest you use the latest version of C2000ware to debug the issue. It has many tested examples. Look at C:\ti\c2000\C2000Ware_2_01_00_00\device_support\f2802x\examples\structs\flash_f2802x. Note that external oscillator and external crystal are two different things. You have added a crystal but repeatedly refer to "external oscillator". To switch to the crystal, you need to use the XtalOscSel (void) function in f2802x_sysctrl.c in C:\ti\c2000\C2000Ware_2_01_00_00\device_support\f2802x\common\source. 

    If you are new to C2000 or CCS, please review the workshops at https://training.ti.com/c2000-mcu-device-workshops. TI has invested considerable resources to develop these self-paced workshops and most questions can be answered by reviewing the workshop material for your specific device family or its closest equivalent. The workshops are an excellent introduction to the basics of C2000 MCUs and the process of writing and running your first example. Good introductory videos about CCS are available at https://www.youtube.com/user/CodeComposerStudio.

  • Hi Mahesh,

    The on-chip flash plugin always uses the device's INTOSC when programming the code onto the device, so that functionality should not be affected when a external crystal is populated. Can you please share a screenshot of the error you are receiving within CCS? I think there may have been some confusion on the problem you're facing.

    As Hareesh mentioned, you may be configuring the clocking scheme for a non-existent external oscillator instead of an external crystal. Please see figure 1-18 in the device TRM to better understand the clocking tree within the F2802x device:

    http://www.ti.com/lit/sprui09

    Best,

    Kevin