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.

  • Resolved

Starterware/CC3120: Unreliable WLAN Connection - Sometimes Failing To Connect With CC3120/CC3220

Expert 8000 points

Replies: 6

Views: 1894

Part Number: CC3120

Tool/software: Starterware

Dear Support:

I am using a CC3120 with an MSP432 using the WiFi plugin v1.30 and trying to connect to my WLAN router using the code from the network_terminal example and it isn't always connecting - about 60% of the time.  When it fails, I get the following error:

[ERROR] - FATAL ERROR: Sync loss detected n
[line:653, error code:-2005] Device error, please refer "DEVICE ERRORS CODES" section in errors.h
Network Terminal - Couldn't configure Network Processor

do you know what may be the problem?  From looking up the error, I get the following:

/* API has been aborted due to an error detected by host driver */
#define SL_API_ABORTED (-2005)

but that doesn't tell me much.  I have tried this with a couple different routers and getting the same result with about the same frequency of occurrence.  Please advise of any thing I can try to fix this problem.

BTW - I use CC3100 and CC3200 a lot with these routers and have no issues with them connecting.  Something going on that is unique to CC3120.  I have also tried this with a CC3220 and getting the same problem with it connecting to these routers.

Thanks,
Tim

  • Hi Tim,

    This needs some more investigation, but could you try the following patch to see if this helps - ensuring that the NWP interrupt is cleared during initialization, in cc_pal.c.

    int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl , void* pValue)
    {
    	/* Check for unregister condition */
    	if(NULL == InterruptHdl)
    	{
    		GPIO_disableInt(MSP_EXP432P401R_HOST_IRQ);
    		GPIO_clearInt(MSP_EXP432P401R_HOST_IRQ);
    		g_Host_irq_Hndlr = NULL;
    		return 0;
    	}
    	else if(NULL == g_Host_irq_Hndlr)
    	{
    		g_Host_irq_Hndlr = InterruptHdl;
    +++             GPIO_disableInt(MSP_EXP432P401R_HOST_IRQ);
    +++             GPIO_clearInt(MSP_EXP432P401R_HOST_IRQ);
    		GPIO_setCallback(MSP_EXP432P401R_HOST_IRQ, HostIrqGPIO_callback);
    		GPIO_enableInt(MSP_EXP432P401R_HOST_IRQ);
    		return 0;
    	}
    	else
    	{
    		/* An error occurred */
    		return -1;
    	}
    }

    Cheers,

    ~roger

  • In reply to RogerMonk:

    Hey Roger:

    Thanks for your response, but not sure how to try this since this would require me rebuilding the simplelink.a library.
  • In reply to Tim Simerly:

    Hey Roger:

    Never mind that last post - I figured it out and it works! So how did you know that? You got some inside track going on that I don't know of? :-)

    Thanks,
    Tim
  • In reply to Tim Simerly:

    Hey Roger:

    Just a few questions:

    1.) I made the change that you suggested to cc_pal.c and built per the following:

    c:\ti\xdctools_3_32_00_06_core\gmake.exe

    from the following directory:

    C:\TI\simplelink_msp432_sdk_wifi_plugin_1_30_00_03\source\ti\drivers\net\wifi

    Is this the right version of xdctools that I should be using to build this? My latest xdctools is v3_50_01_12_core - should I be using this?

    2.) Prior to making this change, I found that pressing the SW2 button on the CC3120BOOST BP helped out significantly. Went from being able to boot like 30% of the time to like 90% of the time, but not always. However making this change that you suggested seemed to fix the problem - it is booting like 100% of the time now - haven't got it to fail yet. So how did you know this? Would have been nice if this fix had been put in prior to me posting and me finding out the hard way how to get it working. :-( Oh well, no complaints - just glad you found the fix, but would like to know how you found this out.

    3.) A patch with +++? Man you must think I am using Linux!!! Just give me the code changes and/or a .zip file - I much prefer the old fashioned way! :-)

    Thanks,
    Tim
  • In reply to Tim Simerly:

    Hi Tim,

    Great - glad that helped a bit.

    1a) simplelink_msp432_sdk_wifi_plugin_1_30_00_03 was built using xdctools_3_50_01_12_core ( as per rel notes/dependencies ). I'd recommend sticking with that version for now.

    1b) *however*, you could simply add the modified cc_pal.c to your main application project, to save rebuilding the underlying library. This would save you needing to modify your sdk tree. I'd probably recommend that approach and keep your changes localised. You can then pull the modified file from the project, once we can get the base sdk updated with a proper fix.

    2) I hit the same issue last week, so it was fresh in my mind ;)

    3) sorry ;)

    cheers!
    ~roger

  • In reply to RogerMonk:

    Ok, thanks.

    Tim

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.