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.

LAUNCHXL-F2800137: How to set up 2800137 clock from external crystal oscillator?

Part Number: LAUNCHXL-F2800137
Other Parts Discussed in Thread: TMS320F2800137,

Tool/software:

Hello,

I try to set up external crystal on TMS320F2800137 LaunchPad. I modify cock source define as the following code.

#define DEVICE_SETCLOCK_CFG_XTAL (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(48) | \
SYSCTL_REFDIV(1) | SYSCTL_ODIV(4) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_0)

And Device_init() also modified as following code.

SysCtl_setClock(DEVICE_SETCLOCK_CFG_XTAL);

These modify doesn't work. The XDS110 will lost connect to MCU and code don't run.

Depend on  LAUNCHXL-F2800137 Schematic (Rev. A).pdf, the LaunchPad already has crystal on board and already connect GPIO18 and 19 to crystal X1 and X2.

Should I change any where to get a normal external crystal clock?

Thanks for help

  • Hi Albert,

    You are overclocking the oscillator circuit.  The original definition for DEVICE_SETCLOCK_CFG in the examples is meant for the 10MHz internal oscillator.  If you apply the clock input multiplier of 48 to 10MHz, this will produce a 480MHz VCO clock for the PLL, which meets the spec value.  When you switched to XTAL which has a clock frequency of 20MHz, VCO is now at 960MHz, which is way out of spec.  Change the multiplier to 24 to get the VCO clock in the spec.

    Regards,

    Joseph

  • Hi Joseph

    Thanks for your help.

    As you said, I modify DEVICE_SETCLOCK_CFG_XTAL value base on 20MHz source clock and It's work.

    The program can run normally and debug function is also working find.

    New DEVICE_SETCLOCK_CFG_XTAL setting  as:

    #define DEVICE_SETCLOCK_CFG_XTAL (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(24) | \
    SYSCTL_REFDIV(2) | SYSCTL_ODIV(1)| \
    SYSCTL_SYSDIV(2) | SYSCTL_PLL_ENABLE | \
    SYSCTL_DCC_BASE_0)