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.

CC3100 Hangs in driver.c while getting time from NIST

Hello SimpleLink experts!

We are having an issue with the Simplelink library. It hangs (in driver.c file) sometimes while trying to get the current time from the NIST time servers. It works fine most of the time but sometimes it just hangs and we have found no way to recover from it except to reset our device.

Can you point me to a solution?

  • Hi,

    Can you provide more details?

    1. where does it hang?
    2. what is the call stack when it happens? can you run in debug and stop the debugger?
    3. is it 100% reproducible? can you provide steps to reproduce?

    Shlomi

  • Hi Shlomi,

    The program hangs in the sl_recvFrom() function which is in socket.c file and is called from our GetSNTPTime(). I could not pinpoint where exactly it hangs but I suspect it's the _SlDrvDataReadOp() (in driver.c file) which gets called from sl_RecvFrom() function.

    This issue happens intermittently (~once every 50 times).

    That is why it's difficult to debug and pinpoint it.

    In the _SlDrvDataReadOp(), there are multiple calls to _SlDrvProtectionObjLockWaitForever() which waits forever to obtain a semaphore. In which cases will the program fail to obtain that semaphore?

    I have attached the code snippet for your reference. Do you suspect why and where the issue must be happening?

    network_time_snippet_for_TI.cpp

  • Hi Emrys,

    Like Shlomi said, we need those details in order to debug.
    When the application hangs, can you please pause the debugger and give us the stack trace?