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.

SimpleLinkHttpServerCallback fault

Other Parts Discussed in Thread: CC3200

Hello,

While using the simplelink API to receive and send tokens in order to display and update a web page and running another task periodically to play audio files using FreeRTOS, the stack overflows and the system crashes with a fault.
The problem has been narrowed down to these specific actions being performed as the system behaves normally either of the two tasks aren't running simultaneously.
SimpleLinkHttpServerCallback seems to cause the issue as the issue disappears if everything inside this function is commented out.
I did find a post on the ti forums that did address a very similar problem but no solution was posted online. Instead, it says that it is a known bug and was fixed in the next version of the SDK.
Link to the post:
I would like to know if the bug was indeed fixed in the latest service pack/sdk release and if there is a workaround to this issue.
  • Rahul,

    I have moved your post to the appropriate forum.

    Thanks,
    Mark
  • Rahul -
    our design folks confirmed that the SDK v1.2 (released in March) does include the fix - you can download it from here.
    www.ti.com/.../cc3200sdk
  • Josh,

    We are using the SDK v1.2 and still experiencing this issue.

    If that previous issue was resolved then how would you like to go about debugging and resolving this new issue?

    SimpleLinkHttpServerCallback seems to cause the issue as the issue disappears if everything inside this function is commented out.
  • We could recreate the issue with a stripped down version of the firmware that can run on the CC3200 LaunchPad.

    This version is a modification to the wlan_ap example project.
    Essentially what we have added is another task i.e. Audio that loads the I2S buffer with an actual wav file in order to simulate playing a wav file over and over again.
    All the modified code is in a single file (main.c).
    The example by default used TI-RTOS which was changed to use FreeRTOS by making the necessary modifications to the oslib project.
    Other modifications that were done to the oslib are as follows:
    1. In osi_freertos.c changed the macro to 
    #define slQUEUE_SIZE ( 1 )
    from the original
    #define slQUEUE_SIZE (3)
    2. In freertosconfig changed the following:

    #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32768) )

    #define configCHECK_FOR_STACK_OVERFLOW       2

    After building the wlan_ap project and running it on the LaunchPad and having a serial terminal open, it will first run the wlan task and prompt for a name for the AP as in the example.
    On giving it the name, it creates an AP to which one can connect any device.
    Once the connection is completed, the audio task starts running.
    This essentially causes the audio file to be loaded in the buffer over and over.
    While this is running, we can load the webpage stored on the LaunchPad by navigating to
    While all this is happening we are printing the stack sizes of the tasks that are running.
    If we let it run for a while then we observed that the simpeLinkhttpServerCallback task stack takes the value of the audio task stack at some point and thereafter causing its stack to suddenly grow leading to a fault.
    Following are the links to the wlan project itself and the corresponding usf to load the audio file and the webpage.
    Can you help debug it?