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.

TMS320F280049C: How to use internal oscillator (INTOOSC2)

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

I have a TMS320F280049C MCU on a custom PCB for a senior design project at my university. I do not have an external oscillator on the board and I am hoping to use the internal oscillator in the MCU instead.

However, all of the example code for this device on resource explorer use the external oscillator.

I am wondering how to use the example code without an external oscillator and use the internal oscillator (INTOSC2) instead.

  • hi Jake,

    I expect you are referring to examples in C2000Ware\driverlib\f28004x\examples.

    The below API is used to set clock 

    //
    // Set up PLL control and clock dividers
    //
    SysCtl_setClock(DEVICE_SETCLOCK_CFG);

    This macro in device.h needs to be updated to point to the INTOSC

    //
    // Define to pass to SysCtl_setClock(). Will configure the clock as follows:
    // PLLSYSCLK = 20MHz (XTAL_OSC) * 10 (IMULT) * 1 (FMULT) / 2 (PLLCLK_BY_2)
    //
    #define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(10) | \
    SYSCTL_FMULT_NONE | SYSCTL_SYSDIV(2) | \
    SYSCTL_PLL_ENABLE)

    So ideally since the INTOSC is 10 Mhz and taking below ex.

    IMULT = 19 (0x13), FMULT = 0.25

    (0x1), ODIV = 1 (0x0)
    SYSCLKDIVSEL.PLLSYSCLKDIV = 2 (0x1)

     The macro should be (SYSCTL_OSCSRC_OSC2| SYSCTL_IMULT(19) | \
    SYSCTL_FMULT_1_4| SYSCTL_SYSDIV(2) | \
    SYSCTL_PLL_ENABLE)

    Check the API guide for more details on the API. C2000Ware\device_support\f28004x\docs

    Please refer to section 3.7.11 Clock Configuration Examples of the TRM

    Regards.