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.

RTOS/CC1310: NVS and crypto examples

Part Number: CC1310
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi,

I am using TI-RTOS SDK version 2.21. I am using concentrator and node example. I want to include the NVS and encryption to these codes. Is there any example code which shows how to include the NVS and crypto driver. The example that I have found are using the simplelink SDK. This is my first time using CC1310 so any help would be appreciated.

Thank you,

Ashish

  • You can find more information about the crypto library here:
    dev.ti.com/.../group__crypto__api.html

    In addition, there are two examples in the SDK that exemplify how to use the NVS driver (nvsinternal and nvsexternal).
  • NVS internal and NVS external are using Simplink SDK. I am using tirtos_cc13xx_cc26xx_2_21. 

    Found this link 

    In this example what is .isRam used for? If it is assigned false value is the data stored in Flash instead of RAM?

    Thank you,

    Ashish

  • I was able to successfully compile the code using the steps given in above link but when i try to run the code it gets stuck. I found that when it tries to initialize a semaphore in NVSCC26XX.c(TI-RTOS SDK) it throws a error - Can't find a source file at "/db/vtree/ademars/git_trees/avala-v/src/ti/sysbios/rom/cortexm/cc13xx/package/cfg/ti.sysbios.knl.Semaphore_config.c" . How to solve this issue?
  • Check your configuration file (.cfg) to make sure the TI-RTOS semaphore module is included by searching for the following block:

    /* ================ Semaphore configuration ================ */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    /*
     * Enables global support for Task priority pend queuing.
     *
     * Pick one:
     *  - true (default)
     *      This allows pending tasks to be serviced based on their task priority.
     *  - false
     *      Pending tasks are services based on first in, first out basis.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsPriority = true;
    Semaphore.supportsPriority = false;

  • Thank you for your reply. Both the Semaphore.supportsPriority and Semaphore.supportsEvents are assigned 'false'. I figured out the problem it was related to NVS configuration.But now NVS_write is giving issues the program handle does not return once it enters NVS_write why is that?

    Also do you have any example for using flash.c/.h instead of using NVS with TI-RTOS SDK?

    Ashish

  • The latest CC13x0 SDK has an example that uses the extflash.c/.h instead of the NVS driver (rfWsnNodeExtFlashOadClient).

    The NVS driver will return a status from a write call, if there is an error when the NVS_open function is called the handle may be null. The call to NVS_write is blocking and it may be stuck inside the function if it is never returning. See the following document for more information:
    software-dl.ti.com/.../_n_v_s_8h.html

    The flash driverlib information can be found here:
    software-dl.ti.com/.../flash_8h.html
  • A working Crypto example does not exist. Hopefully a user can share some thing.
  • Ashish Rai85 : Why are you using tirtos_cc13xx_cc26xx_2_21? If possible it's highly recommended to use the newest SDK to get the newest drivers with bug fixes etc.