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.

CC3200 OTA sl_extLib_OtaSet options

Expert 1580 points
Other Parts Discussed in Thread: CC3200

The documentation in the CC3200 Simplelink OTA Extlib API User's Guide.chm help file and even the ota_api.h file itself shows the following possible values for pOptionVal:

EXTLIB_OTA_SET_OPT_SERVER_INFO - Set the Server information \n
EXTLIB_OTA_SET_OPT_VENDOR_ID   - Set the Vendor ID string \n
EXTLIB_OTA_SET_OPT_COMMITED - Commit the last OTA update & move to idle \n

But the code (in the same header file) lists the following values:

typedef enum
{
    EXTLIB_OTA_SET_OPT_SERVER_INFO = 0,  /* see OtaOptServerInfo_t   */
    EXTLIB_OTA_SET_OPT_VENDOR_ID,
    EXTLIB_OTA_SET_OPT_IMAGE_TEST,
    EXTLIB_OTA_SET_OPT_IMAGE_COMMIT
} OtaSetOpt_e;

The example code uses the EXTLIB_OTA_SET_OPT_IMAGE_TEST value.  I assume it was originally just 'commited' which tested and committed the new binary, and then it was split into two operations.  However the example only uses the 'test' option without a second 'commit' instruction, and it definitely commits the binary.  So can someone confirm that EXTLIB_OTA_SET_OPT_IMAGE_TEST does both 'test' and 'commit' operations?  What is the purpose of the 'commit' operation then?  Or is the documentation correct, and there is no fourth option, only the test and commit option called EXTLIB_OTA_SET_OPT_COMMITED = 2.


Also, can anyone confirm that there is a limit to the vendor ID string?  It seems if I use anything longer than 19 characters the OTA library hangs.

  • Hi,

    Thanks for pointing this out.

    EXTLIB_OTA_SET_OPT_IMAGE_TEST will set the Image for testing
    EXTLIB_OTA_SET_OPT_IMAGE_COMMIT will commit the image.

    The sequence is like this, once the download is complete the image is set for testing. Once the Application requests a reboot, the application bootloader loads the test image. This test image tests itself and commits and then reboots again.

    If the test image requests reboot without committing, the test image is discarded.

    Thanks and Regards,
    Praveen
  • Thanks Praveen for clarifying.
  • I have it performing the test when the app starts as shown in the ota example, but I'm having a new problem now.

    After this commit operation is performed...
    SetCommitInt = OTA_ACTION_IMAGE_COMMITED;
    sl_extLib_OtaSet(pvOtaApp, EXTLIB_OTA_SET_OPT_IMAGE_COMMIT, sizeof(int), (_u8 *)&SetCommitInt);

    ...whenever the new program runs and tries to do another update, sl_extLib_OtaRun returns -7 and it never completes a new update. (It actually returns 0 exactly four times, and then returns -7 and aborts.) This happens both from a soft reset after committing the image, and also from a hard reset. I can see the new image is committed and otherwise seems to be running properly, except for that it can't do the OTA update again.

    1. The -7 error is RUN_STAT_ERROR_DOWNLOAD_SAVE. What does this mean, i.e. what causes it? The documentation doesn't provide any information on this. I thought maybe there was a SFlash capacity issue and tried formatting it but this didn't help.

    2. What could the commit operation above be doing that would cause the OTA update to permanently fail?

    3. Another thing I noticed... In the call to sl_extLib_OtaInit the RUN_MODE_NONE_OS flag is set. This is the case in both the "ota_update_os" and "ota_update_nonos" example projects. Is this flag correct in the case of the 'os' version? I'm using the OTA library in a TI_RTOS project, so I assume I should use the RUN_MODE_OS flag instead?