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.

Simplelink Stack size on MCU

Hi


Does someone know the size of the simplelink driver needed on the MCU Host? I run a few times into a few Stack overflow  while sending and receiving data and I not sure how big the stack must be for the simplelink driver.


Thanks

David

  • Would this not depend greatly on what you are doing within your host code, based on which SimpleLink APIs are being called, and which of your own are being called?

    I am not sure if you are using an RTOS or not, but one of the reasons I like TI-RTOS is that I can quickly determine what I should set my stack size for each of my tasks/threads, as it will display the maximum used in the operation of my application in the ROV window. 

    If you are not using TI-RTOS, then this may be more a process of trial and error to get the right size....or you can try using this method - http://processors.wiki.ti.com/index.php/Stack_and_Heap_size_requirements

    Glenn.

  • No, the stack size of the simplelink driver should not depend what I'm doing in my host code. I just want to know the worst case stack usage of the driver. Of course I can try to find it with try and error, but then I can't be 100% sure that my stack is in any cases large enough.

    But the problem with the stack overflow was not the limited stack. As I have seen the stack overflow appears when I call "sl_Stop(0)" when the WiFi Chip is already disabled.

  • Hi David,

    Apologies for missing this thread.

    The stack size required for the simplelink host depends upon the host API's used. Some API require less memory on stack compared to others. It also depends on the compiler and the controller used.

    For MSP430 compiled using the IAR the maximum stack depth should be 532 Bytes. Please note this is the stack required by simplelink host (SDK 1.0.0) only.

    Regards,

    Ankur

  • Hi Ankur


    Thanks, this was the answer I was looking for!


    best regards,

    David