• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Stellarisware
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Forums

    Stellarisware

    This question has suggested answer(s)
    DerekG
    Posted by DerekG
    on Apr 19 2012 11:44 AM
    Intellectual985 points

    My questions are centered around what RTOS to choose given our connectivity requirements.  A little bit of background on connectivity requirements for our new family of products:

    1. Must support Ethernet (TCP, UDP, DHCP, Static IP, ARP, HTTP, Ping, Telnet protocols to name a few).
    2. Must support USB On-The-Go: must be able to connect the product to a PC (Device mode), must be able to connect a gamepad/joystick/flash drive to the product (Host mode).

     

    Based on the initial literature survey, we thought that lwIP TCP/IP stack and StellarisWare USB library would be able to satisfy these two requirements. Our questions are:

     

    1. We were under the assumption that since SYS/BIOS is a TI product, and the third-party drivers (lwIP and StellarisWare) are recommended by TI, they would all play well together.  Is this correct?
    2. Is lwIP TCP/IP stack supported by SYS/BIOS RTOS? Has this stack been ported to SYS/BIOS or should we do that on our own?
    3. Do we need to buy/get third party USB stack to accomplish USB OTG (please see our requirements above)?
    4. Are there any example projects that show how lwIP TCP/IP stack works under SYS/BIOS RTOS?
    5. Are there any example projects that show how StellarisWare library APIs can be called from SYS/BIOS RTOS?
    6. If SYS/BIOS is not the right choice for our requirements, can you recommend an alternative solution?

    Thanks

    Derek

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Rebecca Ringhof
      Posted by Rebecca Ringhof
      on Apr 20 2012 18:34 PM
      Expert6435 points

      Derek,

      There a few different RTOSs to choose from.  One is SYS/BIOS.  We have an application note to demonstrate how to create SYS/BIOS examples using StellarisWare.  Using SYS/BIOS and Ethernet is a common request and although there are challenges, we have assisted customers in the past with this task.  I'll have to do more research as to what these challenges were and how they were resolved.  

      SafeRTOS is another option which has additional software components to support USB and TCP/IP; free trial versions of this software can be found here.  The LM3S9D96 has SafeRTOS in the ROM.  For the DK-LM3S9D96, there is an example in StellarisWare called safertos_demo which utilizes SafeRTOS to perform a variety of tasks including lwIP.

      We don't have any StellarisWare examples that use RTOS and USB concurrently.  However, StellarisWare generally works well with both of these RTOS solutions.  I'll have to consult our RTOS/USB experts if there are any known issues with using these together.

      What are your plans with USB OTG?  Are you using the Stellaris device as a hub for all of these devices?  Are you connecting to either only a PC or only a joystick at any given time?  The current Stellaris USB library can accomplish OTG functionality where you can switch between Host and Device using API functions which will work for the case when the Stellaris device is only connected to a PC or only connected to a joystick or the like.  You can use the Stellaris USB Library without a third USB stack.  If you had a different topology in mind, please elaborate.

      -Rebecca

        

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Apr 21 2012 15:21 PM
      Guru31975 points

      DerekG
      third-party drivers (lwIP and StellarisWare)

      StellarisWare is not 3rd party

       are recommended by TI

      I don't know that they're specifically "recommended" - TI may just have found them useful for the purpose of demonstrating their products.

       they would all play well together.  Is this correct?

      No, I don't think you can draw that conclusion.

      It may well happen to be the case, but I don't think that it necessarily follows as a conclusion.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Martin Honeywill
      Posted by Martin Honeywill
      on Apr 21 2012 17:57 PM
      Prodigy160 points

      If you don't need a pre-emptive RTOS try looking at utasker www.utasker.com 

      Works well for us and brilliant support from the author

      Cheers

      Martin Honeywill

      utasker rtos
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • DerekG
      Posted by DerekG
      on Apr 23 2012 18:21 PM
      Intellectual985 points

      Rebecca,

      In answer to your questions:

      What are your plans with USB OTG?

      We must be able to connect our device to a host PC or be able to connect a joystick to the device. In the first case, our device must be configured as an Embedded Host, and in the second case our device must be configured as a Peripheral.   Our device will have one Micro-AB receptacle.  At the present time. we do not foresee a need for Host Negotiation Protocol. 

      Are you using the Stellaris device as a hub for all of these devices?

      No

      Are you connecting to either only a PC or only a joystick at any given time?

      Yes

      Derek

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Rebecca Ringhof
      Posted by Rebecca Ringhof
      on Apr 24 2012 09:38 AM
      Suggested Answer
      Expert6435 points

      Derek,

      After talking to our RTOS/USB expert, the current Stellaris USB library is not thread-safe, therefore it shouldn't run under an RTOS, including SafeRTOS and SYS/BIOS.  The current Stellaris USB library is interrupt driven and not meant to work with a task scheduler as should be done under an RTOS.

      The lwIP Ethernet stack is RTOS compatible (including SafeRTOS and SYS/BIOS).  The safertos_demo, as mentioned previously, is a great starting example for this application.  There shouldn't be any compatibility challenges using an RTOS with lwIP due to thread safety.

      To accomplish your task of using all three of these together, you may want to look at third party USB stacks or modify the current USB OTG examples to be more thread-safe.

      -Rebecca

        

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Doug Baker
      Posted by Doug Baker
      on Apr 24 2012 10:54 AM
      Expert1770 points

      Rebecca,

      I know lwip is not thread safe but I have an application that runs safe RTOS with a 9D96 and I use both lwip and USB.    I created a thread for lwip and a thread for usb along with other threads for my app.  Callbacks from lwip (interrupts) send a message to the tcpip thread and any task wishing to send data via TCP/IP will also send a message to the lwip task so anything using  lwip is all done in the one tcpip task .  The USB task is implemented in a similar way but as far as sending data I only send USB data from the one USB thread/task so if I am sending data from a low priority task and higher priority task send data it will not mix the data up.

      Doug

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Christian Jolivet
      Posted by Christian Jolivet
      on Apr 24 2012 13:34 PM
      Expert5240 points

      While the lwIP stack may not be thread-safe in the general sense, it is designed to be used under an RTOS in a multi-threaded environment. This requires the programmer to allocate threads in a certain way to prevent conflicts. There is documentation on the lwIP website that explains how to use the APIs in this manner.

      http://www.sics.se/~adam/lwip/doc/lwip.pdf

      USBLib is also not generally thread-safe, but a careful programmer may incorporate it into an RTOS-based application (as you have done).

      Regards,
      Christian

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • DerekG
      Posted by DerekG
      on May 02 2012 17:37 PM
      Intellectual985 points

      Rebecca,

       you proposed one option of modifying the “current USB OTG examples”.  I looked through the latest Stellarisware downloaded from TI, and could not find any OTG examples.  Where can i find the USB OTG examples?

      thanks

      Derek

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Austin Miller
      Posted by Austin Miller
      on May 03 2012 08:49 AM
      Suggested Answer
      Expert6265 points

      Derek,

      You will find one of the OTG examples here: C:\StellarisWare\boards\dk-lm3s9b96\otg_detect

      Note that this is the default location, if you changed the location at install the directory will be: <root>:\StellarisWare\boards\dk-lm3s9b96\otg_detect and that this is for the DK-LM3S9B96.

      There is also the same OTG example for the 512k Flash parts using the DK-LM3S9D96.

      Best regards,

      Austin Miller

      Digital Field Applications 


      If my reply answers your question please click on the green button "Verify Answer".

      MCU Wiki: MSP430, Stellaris, C2000, Hercules or check out the Processors Wiki
      CCS and Free SW Suites: CCSv5, MSP430Ware, StellarisWare
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use