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.

CC3235SF: Global Lock Mutex Issue

Part Number: CC3235SF
Other Parts Discussed in Thread: CC3120

Hi,

A member of our team found this in the simplelink SDK for the CC3120 and now we are migrating to CC3235 and notice that this is also present in the SDK. Is this an issue that we can hope to fix?

TI's latest Simplelink WiFi plugin driver (4.20.00.10) has a bug which was causing the "freeze" issue on our device. This occurs when an asynchronous Simplelink event (usually a SOCK ERROR) occurs while establishing a TLS connection. In this case, the driver fails to unlock the global driver mutex and the entire system effectively freezes.

Here is the change that was implemented:

/*******************************************************************************/
/*   _SlSocketHandleAsync_StartTLS */
/*******************************************************************************/
_SlReturnVal_t _SlSocketHandleAsync_StartTLS(void *pVoidBuf)
{
    _u8 ActionIndex;

    SlSocketAsyncEvent_t *pMsgArgs =
        (SlSocketAsyncEvent_t *)((_u32)pVoidBuf + sizeof(_u32));

    SL_DRV_PROTECTION_OBJ_LOCK_FOREVER();

    VERIFY_PROTOCOL((pMsgArgs->Sd & SL_BSD_SOCKET_ID_MASK) <= SL_MAX_SOCKETS);

    /* Match the action index*/
    for(ActionIndex = 0; ActionIndex < MAX_CONCURRENT_ACTIONS; ++ActionIndex)
    {
        if((g_pCB->ObjPool[ActionIndex].AdditionalData & 0x0F) ==
           pMsgArgs->Sd &&
           ((g_pCB->ObjPool[ActionIndex].ActionID) == START_TLS_ID))
        {
            break;
        }
    }

    if(ActionIndex == MAX_CONCURRENT_ACTIONS)
    {
        SL_DRV_PROTECTION_OBJ_UNLOCK(); //OUR CHANGE HERE, ADDED THIS LINE
        return(EVENT_PROPAGATION_CONTINUE);
    }

    VERIFY_SOCKET_CB(NULL != g_pCB->ObjPool[ActionIndex].pRespArgs);

    ((SlSocketAsyncEvent_t *)(g_pCB->ObjPool[ActionIndex].pRespArgs))->Sd =
        pMsgArgs->Sd;
    ((SlSocketAsyncEvent_t *)(g_pCB->ObjPool[ActionIndex].pRespArgs))->Type =
        pMsgArgs->Type;
    ((SlSocketAsyncEvent_t *)(g_pCB->ObjPool[ActionIndex].pRespArgs))->Val =
        pMsgArgs->Val;

    SL_DRV_PROTECTION_OBJ_UNLOCK();
    if((SL_SSL_NOTIFICATION_HANDSHAKE_FAILED == pMsgArgs->Type ||
        SL_SSL_NOTIFICATION_CONNECTED_SECURED == pMsgArgs->Type))
    {
        SL_DRV_SYNC_OBJ_SIGNAL(&g_pCB->ObjPool[ActionIndex].SyncObj);
        return(EVENT_PROPAGATION_BLOCK);
    }
    else
    {
        return(EVENT_PROPAGATION_CONTINUE);
    }
}