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.

CCS/CC3100: CC3100Boost / MSP430FR5994 Launchpad - Getting stuck in loop at sl_Start()

Part Number: CC3100
Other Parts Discussed in Thread: MSP430FR5994, MSP430F5529,

Tool/software: Code Composer Studio

(This is my first time for both working with microcontrollers and posting here, so please let me know if I need to provide additional info or if I need to post elsewhere)

Hi, I am trying to use the CC3100Boost with MSP430F45R994 Launchpad for a school project. First, I started with the provisioning_wps example project in the CC3100SK_1.3.0 and got it running on a MSP430f5529 launchpad that I already had. Now I am trying to that project to the MSP430FR5994 board.

I copied the board, spi, uart, etc. files from the fr5969 example and changed the pins in the files to match what is on the fr5994.  I can run the program and output data to the command line interface, but I keep getting stuck in sl_Start() function, specifically in _SlReturnVal_t ret = sl_SyncObjWait(pSyncObj, timeoutVal);

When I run the project on the 5529lp, I notice that the code will run through the while (Timeout>0) loop once and then break on the second time through. On the 5994lp I keep getting stuck here.

I noticed that in the _SlNonOsMainLoopTask() function, the 5529lp program will execute the spawn function on the first time through the loop, but the 5994lp never enters the if statement and executes it. Have I missed a step in the porting process or forgot to include a certain library?

I have attached a zip that includes my project and the platform files I modified.

 

_SlNonOsRetVal_t _SlNonOsSemGet(_SlNonOsSemObj_t* pSyncObj, _SlNonOsSemObj_t WaitValue, _SlNonOsSemObj_t SetValue, _SlNonOsTime_t Timeout)
{
#if (!defined (SL_TINY)) && (defined(sl_GetTimestamp))
      _SlTimeoutParams_t      TimeoutInfo={0};
#endif

	 /* If timeout 0 configured, just detect the value and return */
      if ((Timeout ==0) && (WaitValue == *((volatile _u8 *)pSyncObj)) )
	  {
		  *pSyncObj = SetValue;
		  return NONOS_RET_OK;
	  }

#if (!defined (SL_TINY)) && (defined(sl_GetTimestamp))
      if ((Timeout != NONOS_WAIT_FOREVER) && (Timeout != NONOS_NO_WAIT))
      {
    	  _SlDrvStartMeasureTimeout(&TimeoutInfo, Timeout);
      }
#endif

#ifdef _SlSyncWaitLoopCallback
    _SlNonOsTime_t timeOutRequest = Timeout; 
#endif
    while (Timeout>0)
    {
        if (WaitValue == *((volatile _u8 *)pSyncObj))
        {
            *pSyncObj = SetValue;
            break;
        }
#if (!defined (sl_GetTimestamp)) ||  (defined (SL_TINY_EXT))
        if (Timeout != NONOS_WAIT_FOREVER)
        {		
            Timeout--;
        }
#else        
        if ((Timeout != NONOS_WAIT_FOREVER) && (Timeout != NONOS_NO_WAIT))
        {
            if (_SlDrvIsTimeoutExpired(&TimeoutInfo))
            {
            	return (_SlNonOsRetVal_t)NONOS_RET_ERR;
            }

        }
 #endif       

        /* If we are in cmd context and waiting for its cmd response
         * do not handle spawn async events as the global lock was already taken */
        if (FALSE == g_pCB->IsCmdRespWaited)
        {
        (void)_SlNonOsMainLoopTask();
        }
#ifdef _SlSyncWaitLoopCallback
        if( (__NON_OS_SYNC_OBJ_SIGNAL_VALUE == WaitValue) && (timeOutRequest != NONOS_NO_WAIT) )
        {
            if (WaitValue == *((volatile _u8 *)pSyncObj))
            {
                *pSyncObj = SetValue;
                break;
            }
            _SlSyncWaitLoopCallback();
        }
#endif
    }

    if (0 == Timeout)
    {
        return NONOS_RET_ERR;
    }
    else
    {
        return NONOS_RET_OK;
    }
}

 3644.test3.zip

  • Hello,

    Since you are stuck at sl_start() and not getting the spawn task, it means you have not reached _SlDrvRxIrqHandler() IRQ handler.

    You can always try and place a breakpoint and verify if you get here or not.

    What you need to verify is that the GPIO you attached to the host IRQ line and the nHib line are OK. If for some reason the device is not powered up correctly since the nHib GPIO is bad or if the host does not get triggered since the host IRQ is bad - you would not get to _SlDrvRxIrqHandler() IRQ handler.

    You can also probe with a logic analyzer those two lines.

    Regards,

    Shlomi

  • Shlomi,

    I placed the breakpoint in and you're right, I'm not hitting the IRQ handler like I am in the 5529lp project. I'm have to put this project on the back-burner for now, but I will double check the nHib and IRQ lines when I get a chance.

    Thanks,
    Isaac

  • Isaac,

    Thanks for the update. If it takes more than 14 days, the thread would get closed. If this is the case, I suggest closing this one and opening a new thread with a reference to this one.

    Regards,
    Shlomi