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.

RTOS/CC3200: Difference between WiFi_open() and sl_start()

Part Number: CC3200


Tool/software: TI-RTOS

Hello,

I've built the internet connection of my application around the TCP example, using the function socketStartUp(). However, I have never understood what this really does. I've read the SimpleLink documentation swru368a and the TI-RTOS user manual and I don't understand what is the purpose of WiFi_open() if you must call sl_start() afterwards, as is done in said example. Moreover, the user manual states that after doing WiFi_open() one should be able to open a socket. 

Could you please clarify this?

Thanks in advance

  • Hi Rodrigo,

    What version of TI-RTOS are you using for development? I need to know because the WiFi driver has changed across a couple releases.

    -- Emmanuel
  • I'm using tirtos_cc32xx_2_16_01_14
    Is there a new version?
  • Hi Rodrigo,

    No new version; you have the latest software package available for the CC3200.  It changed a couple of times up to that release.  

    WiFi_open():

    WiFi_open() does two things which are vital to the host driver:

    1. It creates & registers a hardware interrupt for the network processor.  The CC3200 has an interrupt vector which the network processor can use to tell the application processor that it needs to be serviced.
    2. It creates a (high priority) task to handle asynchronous events.  Some of the host drivers APIs requires the application processor to handle network processor requests asynchronously to the user's application.  These asynchronous events are executed in the context of the high priority task.  If you have read through the CC3200 WiFi documentation this task is known as the Spawn Task.  

    sl_Start():

    The sl_Start() API initializes resources used internally by the host driver (like semaphores & gates) as well enabling the network processor.  However, depending on the options passed into sl_Start(), it may trigger an asynchronous event.  Thus, the network processor interrupt & the Spawn task must have been created before calling sl_Start().

    I hope this helps you understand what each API does & why WiFi_open() needs to be called before sl_Start().

    Regards,

    -- Emmanuel