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.

CC2640 Configure EXT CLK in ccfg.c

The TRM describes the register for setting the EXT 32kHz clock, however, I don't see it defined in the TI_RTOS CCFG.c

Looking for EXT_LF_CLK to set an external clock on a particular DIO (CCFG.EXT_LF_CLK.DIO) when CCFG.MODE_CONF.SCLK_LF_OPTION = EXTERNAL.

Is this defined and if so, where?   There is mention of it in this E2E post, but I am not finding it in ccfg.c

https://e2e.ti.com/support/wireless_connectivity/f/538/t/436781

  • Hi

    What you have to do is :

    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION            0x1          // External LF clock

    and then set this one to the corresponding DIO number

    #define SET_CCFG_EXT_LF_CLK_DIO                         0x01                        // DIO number if using external LF clock

    and if your CLK frequency is different than 32.768kHz, then you have to compensate this by setting this field 

    #define SET_CCFG_EXT_LF_CLK_RTC_INCREMENT               0x800000   // RTC increment representing the external LF clock frequency

    You can find all the information you need here:

    C:/ti/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/doc/register_descriptions/CPU_MMAP/CCFG.html#EXT_LF_CLK

    However, instead of directly modifying ccfg.c, it's recommended to copy the whole ccfg.c into ccfg_appBLE.c and modify from there.(this is stated in the ccfg_appBLE.c)

     

     

  • I am using TI BLE stack 2.0 with TI RTOS 2_11_01_09. I've looked at the ccfg.c file and do not see the EXT_LF clock settings. It is absent from the file. The first register setting I see is MODE_CONF_1.

    Register Name

    Type

    Register Width (Bits)

    Register Reset

    Address Offset

    Physical Address

    MODE_CONF_1

    RW

    32

    0xFFFF FFFF

    0x0000 0FAC

    0x5000 3FAC

    SIZE_AND_DIS_FLAGS

    RW

    32

    0xFFFF FFFF

    0x0000 0FB0

    0x5000 3FB0

    MODE_CONF

    RW

    32

    0xFFFF FFFF

    0x0000 0FB4

    0x5000 3FB4

    VOLT_LOAD_0

    RW

    32

    0xFFFF FFFF

    0x0000 0FB8

    0x5000 3FB8

    Do I need to upgrade TI RTOS 2_13_00_06? Will this RTOS still be compatible with BLE stack 2.0?

  • Hi Stephen,

    Using external clk as source was not supported in that version of TI-RTOS, I would recommend to just port your project with BLE stack 2.1

    Here is the guide on how to port your project from BLE stack2.0 to 2.1

    processors.wiki.ti.com/.../CC26XX_Porting_Projects

  • Hi Stephen,

    Yes support for this was first added in the CC26XXWARE bundled with TI RTOS 2.13.00.06.

    It is possible to get the 2.0 stack running on the 2..13 version as well but I would recommend switching over to the BLE 2.1 version.

    RTOS porting guide for 2.0:
    e2e.ti.com/.../421520

    Porting to the 2.1 stack:
    processors.wiki.ti.com/.../CC26XX_Porting_Projects

    Regards,
    Svend