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.

TMS320F28035: 20MHZ External Oscillator Problem

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

Hi,

      In the board with the TMS320F28035, I am using the same resonator than the one in the CC2803X ISO Card, the Murata CSTCE20MOV53-R0. I try to activate it with code in DSP2803x_SysCtrl.c using the XtalOscSel() function, but is unstable. Sometimes, it works but sometimes not. I have checked with the oscilloscope that the signal in the Xtal is Ok.

               What can I do?

            Thank you in advance

             Fernando Gatto

               From Argentina

  • The crystal oscillator is "on" by default. i.e. you should see the oscillations right after power-up. Is it that the oscillations are absent upon power-up or is it that the oscillations are present, but upon switching to the XTAL OSC, you detect a missing-clock condition?

     

    When it doesn’t work, do you see any oscillations in the X1/X2 pins? Note that the very act of scoping these pins could alter the dynamics of the circuit (unless you use a low-capacitance FET probe)

     

    Could you please share the schematics/layout of the circuitry around the resonator?

     

    Would you be able to put a number on the occurrence of failure? i.e. Oscillator doesn’t work x out of y attempts.

  • Hi Hareesh,

                        Thank you for your rapid response. As you requested this is my application data.

    This is our 4 layer PCB top view using the TMS320F28035

    A zoom of the Resonator

    A view of the top Layer PCB

    Screen capture of the Oscilloscope measuring X1 signal

    The only way I managed to start with the resonator is first flashing the Micro with a code that uses the internal oscillator. And after that I flash again a new program that uses the external Xtal. But if I power down the board and power up again, it doesn’t start. When the board isn’t working the signal on the X1 is what I showed.

     

    To configure the board I am using the code provided by TI in DSP2803x_SysCtrl.c.

    I call XtalOscSel() to configure the external Xtal.

    void XtalOscSel (void) {

         EALLOW;

         SysCtrlRegs.CLKCTL.bit.XTALOSCOFF = 0;     // Turn on XTALOSC

         DELAY_US(10000L);                         // 10mS delay to ensure crystal

                                                   // oscillator is up and running.

                                                   // Adjust as needed.

         SysCtrlRegs.CLKCTL.bit.XCLKINOFF = 1;     // Turn off XCLKIN

         SysCtrlRegs.CLKCTL.bit.OSCCLKSRC2SEL = 0; // Switch to external clock

         SysCtrlRegs.CLKCTL.bit.OSCCLKSRCSEL = 1;   // Switch from INTOSC1 to INTOSC2/ext clk

         SysCtrlRegs.CLKCTL.bit.WDCLKSRCSEL = 0;   // Clock Watchdog off of INTOSC1

         SysCtrlRegs.CLKCTL.bit.INTOSC2OFF = 1;     // Turn off INTOSC2

         SysCtrlRegs.CLKCTL.bit.INTOSC1OFF = 0;     // Leave INTOSC1 on

         EDIS;

    }

     

    After that, I call InitPll(DSP28_PLLCR,DSP28_DIVSEL); with

    #define DSP28_DIVSEL   2

    #define DSP28_PLLCR   6

     

    This is all. Probably with some software Trick the problem could be solved.

    Thank you for your help in advance

    Regards

    Fernando

  • The fact that it only fails sometimes tells me that s/w is unlikely to be the cause of the problem. You have not answered my question: Would you be able to put a number on the occurrence of failure? i.e. Oscillator doesn’t work x out of y attempts. Please answer the questions below carefully:

     

    1. You are saying even when the system does not work, you still see the oscillations in X1/X2 pins. How did you determine it is "not working"?
    2. What does your application code do?
    3. Can you flash a simple code, like toggling a GPIO pin, and retry the experiment?
    4. Do you see this issue on multiple boards?
    5. Are you using the most recent version of c2000ware?

  • Hi Hareesh.

    As I were doing all the testing to answer your questions, I discovered what the problem was. It is as simple that the function XtalOscSel () uses DELAY_US() wich must resides in RAM, and I was coping RamFunctions after calling InitSysCtrl();

    So I changed the order in which functions are called and no more problems.

    Thank you for your response
    Fernando Gatto