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.

TMS320F28027: About external clock input

Part Number: TMS320F28027
Other Parts Discussed in Thread: C2000WARE

Hello.

I have questions.

I would like to input the clock output by CPLD to TMS320F28027 and operate it.
However, it is CLOCK FAIL and it does not work well.

What are the possible causes?
Is there a example to input an external clock?

Regards,

  • Keirs,

    Thanks for reaching out, I want to make sure you are following the guidelines/using the C2000 Ware examples to switch from internal oscillator to external clock.

    First all the F2802x examples call the file F2802x.sysctrl.c.  This file is located in:

    C:\ti\c2000\C2000Ware_1_00_04_00\device_support\f2802x\common\source

    While the default is to use the built in zero pin oscillator 1; you will find function calls for zero pin oscillator 2, external X-tal, and external clock(which is what you want to follow):  The order of operations is important here, else you will get a clock fail even if there is a good clock on the XCLKIN pin.

    void
    ExtOscSel (void)
    {
        EALLOW;
        
        //
        // 1-GPIO19 = XCLKIN, 0-GPIO38 = XCLKIN
        //
        SysCtrlRegs.XCLK.bit.XCLKINSEL = 1;
        
        SysCtrlRegs.CLKCTL.bit.XTALOSCOFF = 1;    // Turn on XTALOSC
        SysCtrlRegs.CLKCTL.bit.XCLKINOFF = 0;     // Turn on XCLKIN
        SysCtrlRegs.CLKCTL.bit.OSCCLKSRC2SEL = 0; // Switch to external clock
        
        //
        // Switch from INTOSC1 to INTOSC2/ext clk
        //
        SysCtrlRegs.CLKCTL.bit.OSCCLKSRCSEL = 1;
        
        //
        // Switch Watchdog Clk Src to internal clock 1
        //
        SysCtrlRegs.CLKCTL.bit.WDCLKSRCSEL = 0;
        
        SysCtrlRegs.CLKCTL.bit.INTOSC2OFF = 1;    // Turn off INTOSC2
        SysCtrlRegs.CLKCTL.bit.INTOSC1OFF = 0;    // Turn on INTOSC1
        EDIS;
    }
    
    //
    // End of file
    //
    
    

    The clock options/mux pins are detailed on page 35 of this doc  http://www.ti.com/lit/ug/sprufn3d/sprufn3d.pdf

    If you have followed all of these, then you need to confirm the levels of the clock input and rise times meet the DS specs.

    Let me know if this solves it, or there is something else not working.

    Best,

    Matthew