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: CC2640R2 to CC2640F128 - Code Without Bluetooth

Part Number: CC2640
Other Parts Discussed in Thread: CC2650,

Hello,

I am porting a code written for cc2640r2 to cc2640f128.

This code does not use bluetooth. It uses only the following functions:
-ADC;
-PWM;
-Timer;
-Watchdog;
-NVS.

As there is no sdk for cc2640f128, I used "tirtos_cc13xx_cc26xx_2_21_01_08" with the example "empty".

In this example it was possible to compile and program cc2640f128.

The problem is that when adding NVS to the code the following error message is displayed:
"
unresolved symbol NVS_config, first referenced in C: /ti/tirtos_cc13xx_cc26xx_2_21_00_06/products/tidrivers_cc13xx_cc26xx_2_21_00_04/packages/ti/drivers/lib/drivers_cc26xxware.aem3 <NVS.oemf ++ C8 / kek_r
"

The code used in the cc2640r2 that works uses the following functions:
NVS_init ();
NVS_Params nvsParams;
NVS_Params_init (& nvsParams);
nvsHandle = NVS_open (0, & nvsParams);
NVS_getAttrs (nvsHandle, & regionAttrs);

Are there any examples of using NVS for this processor or some other SDK compatible with it?

  • Hi,

    Seems you are using tirtos_cc13xx_cc26xx_2_21_01_08, but the error message is looking for it in tirtos_cc13xx_cc26xx_2_21_00_06.

    Can you try this in a new workspace?

    The NVS files for tirtos_cc13xx_cc26xx_2_21_01_08 are in : 

    • C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\tidrivers_cc13xx_cc26xx_2_21_01_01\packages\ti\drivers\nvs
    • C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\tidrivers_cc13xx_cc26xx_2_21_01_01\packages\ti\drivers\NVS.c
    • C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\tidrivers_cc13xx_cc26xx_2_21_01_01\packages\ti\driversNVS.h

    Thanks,
    Toby

  • Hello Toby Pan,

    I uninstalled all sdk and installed tirtos_cc13xx_cc26xx_2_21_00_06. Version 08 was not found in the resource explorer.

    After reinstalling I started a new empty project and added NVS functions.

    The same error occurred.

    Regards,

  • Hello,

    I added the file below:

    #include <ti/drivers/NVS.h>

    The compiler finds all the functions of the NVS. With the exception of NVS_Params_init which is not defined in this sdk version.

    Even removing this function, the nvs_config error occurs.

    nvs_config is defined in nvs.h.

  • Apologies for the delay.

    Thanks for confirming your tirtos version, and good to hear that only one error for nvs_config remains.

    Can you copy/paste what error you are seeing?
    I suspect that it could be an error related to no definition of something like "const NVS_Config NVS_config[]".
    This is typically something which should be defined in the *LAUNCHXL.c file (e.g. CC2650_LAUNCHXL.c) and is used by the NVS driver.

    For example, in the CC2640R2 project, you might check out the CC2640R2_LAUNCHXL.c and find this:

    const NVS_Config NVS_config[CC2640R2_LAUNCHXL_NVSCOUNT] = {
    #ifndef Board_EXCLUDE_NVS_INTERNAL_FLASH
        {
            .fxnTablePtr = &NVSCC26XX_fxnTable,
            .object = &nvsCC26xxObjects[0],
            .hwAttrs = &nvsCC26xxHWAttrs[0],
        },
    #endif
    #ifndef Board_EXCLUDE_NVS_EXTERNAL_FLASH
        {
            .fxnTablePtr = &NVSSPI25X_fxnTable,
            .object = &nvsSPI25XObjects[0],
            .hwAttrs = &nvsSPI25XHWAttrs[0],
        },
    #endif
    };

    Can you confirm that something like this is defined in your CC2640 project?