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/CC2640: CC2640 without 32kHz crystal

Part Number: CC2640
Other Parts Discussed in Thread: CC2650

Tool/software: Code Composer Studio

Hello ,

I'm working on CC2650 LP and tried to realized the working without 32 kHz functionality which would be used for my board. I followed the "Running Bluetooth® low energy on CC2640 Without 32 kHz Crystal" guidance, which is: \

However, when I got the following errors when I modified the Project_Zero_APP project:

1.Could anyone tell me how to set the correct configuration and enable RCOSC_LF?

2.Besides, I will use the 4*4 CC2640 package, what board configuration should I change? I found almost every example is based on 7*7 package chip. Could you please provide an example on the small package chip?

Thanks,

Jianlin

  • Try to change the followings in the ccfg.c file to run CC2640 without 32kHz crystal

    //#####################################
    // Clock settings
    //#####################################

    // #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

    to

    //#####################################
    // Clock settings
    //#####################################

    // #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

  • Hello Jianlin,

    Did you add the files to your project and confirm they are in the application project's include path properties? This looks like a pre-processor failure.

    Changing the package size is as simple as defining the RF configuraiton (CC2650EM_4XS) and mapping the IOs to your board layout, not exceeding IOID_9.

    Best wishes
  • Hello JXS,

    I pasted these three files to my project Startup folder and exclude the ccfg_appBLE file from build. IS that correct or I have to include the files from external folder?

    Thanks,
    Jianlin
  • For CCS, you also need to add the include paths in the Project Properties.
  • Hello Yikai,

    Thank you for your answer. I have two questions regarding your answer/
    1. How can I know that the MCU is using internal clock rather than external OSC after the changing?
    2. With this change, do I still have to add initialization function in my project app?

    Thanks,
    Jianlin
  • Hello JXS,

    1. I added the files to my project:

    2. And then I include the path of these files:

    3. I move these files to my startup folder:

    4. After I add the include code in my app and add the predefined symbol, I enable the following code in the board setting.

    5. However, I still got the following errors:

    Is there anything wrong with my including steps? 

    Thanks,

    Jianlin

  • I just built the changes with project zero for RCOSC and don't see these errors. The only change I had to make relative to the guide is to add:

    "${TI_BLE_SDK_BASE}/src/common/cc26xx/rcosc"

    To the app project's include paths so that it can see the 3 linked files. I added the files as links to the SDK.

    Can you try with a clean workspace? I used CCS v7.1 with TI Compiler v5.2.6.

    Best wishes
  • Hello JXS,

    Did you uncomment the following part which is commented in Board.h:

    Thanks,
    Jianlin

  • This is in my CC2650_LAUNCHXL.c:

    /*
    * ============================= Power begin ==================================
    */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
    #endif
    const PowerCC26XX_Config PowerCC26XX_config = {
    .policyInitFxn = NULL,
    .policyFxn = &PowerCC26XX_standbyPolicy,
    .calibrateFxn = &PowerCC26XX_calibrate,
    .enablePolicy = TRUE,
    .calibrateRCOSC_LF = TRUE,
    .calibrateRCOSC_HF = TRUE,
    };

    I did not make any changes to Board.h

    Best wishes
  • Hello JXS,

    I found that there maybe something wrong with my Project Zero. Could you please tell me how can I import the latest version of Project Zero?
    My CCS is Version: 7.0.0.00042 and compiler is V16.9.0.LTS.

    Thanks,
    Jianlin
  • You can import ProjectZero from CCS->TI Resource Explorer.
  • Please download & install from and import from CCS -> Resource Explorer Classic


    Best wishes

  • Hello JXS,

    I found there are more than one version of project zero. The one I was used whose TI_BLE_SDK_BASE is linked to ble_cc26xx_2_01_00_44423_cloud folder. That could explain why the power section code in my CC2650_LAUNCHXL.c is commented.

    I tried to use your version and it worked.
    IS there a way to know that the MCU is using the internal crystal? If I download the image to my custom board with internal crystal setting, I would use the internal crystal by default?

    Thanks,
    Jianlin