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.

CC3220MODA: Incorrect state check in OtaLib.c

Genius 3100 points
Part Number: CC3220MODA

In the latest SDK - 6.10.00.05, there seems to a bug in OtaLib.c as shown below

Inside OTA_set function

 case EXTLIB_OTA_SET_OPT_DECLINE_UPDATE:

            /* check if after OTA_STATE_CHECK_ARCHIVE_NEW_UPDATE state */
            if (pOtaLib->State != OTA_STATE_REQ_FILE_URL)
            {
                _SlOtaLibTrace(("OTA_set: ERROR EXTLIB_OTA_SET_OPT_DECLINE_UPDATE in wrong state = %d\r\n", pOtaLib->State));
                return OTA_OPT_ERROR_WRONG_STATE;
            }

            /* close all connection from last OTA updates and back to IDLE */
            pOtaLib->ConsecutiveOtaErrors = 0;
            _OtaCleanToIdle(pOtaLib);
            break;

The State check must be done against OTA_STATE_CHECK_ARCHIVE_NEW_UPDATE instead of OTA_STATE_REQ_FILE_URL

Anyway this section is triggered only when the update is declined and hence it may not have a direct impact.