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/CC1310: How to switch external crystal oscillators

Part Number: CC1310

Tool/software: Code Composer Studio

Hi all,

  We try to change external oscillator(32.768kHz) and internal RC oscillator(32kHz) with the following code:

   OSCClockSourceSet(OSC_SRC_CLK_LF, OSC_XOSC_LF);
   //  OSCClockSourceSet(OSC_SRC_CLK_LF, OSC_RCOSC_LF);

We are not sure if we  switch the crystal successful,so we measured the RTC clock cycle,  and find that the RTC clock cycle have a little change when switch OSC_XOSC_LF to OSC_RCOSC_LF .

But we replaced the default external crystal oscillator with a 40 kHz oscillator, this doesn't make any difference when switch OSC_XOSC_LF to OSC_RCOSC_LF .The data manual only provides typical values for XOSC_LF,

is it not possible to replace default OSC_XOSC_LF with other frequencies crystal oscillator?

  • Hi,

    why are you trying to use this function and why at run-time? You should select the LF oscillator at boot-time using the customer-config area (CCFG) and not switch during tun-time. Add the following ccfg.c file to your project:

    /* Set custom value */
    
    // #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x0        // LF clock derived from High Frequency XOSC
    // #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x1        // External LF clock
    //#define SET_CCFG_MODE_CONF_SCLK_LF_OPTION               0x2        // LF XOSC
    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x3        // LF RCOSC
    
    /* Add the defaults for all other undefined values */
    #include <ti/devices/cc13x0/startup_files/ccfg.c>