• 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 » precise data bus fault error occurred while executing simple echo lwip server(no RTOS)
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

    precise data bus fault error occurred while executing simple echo lwip server(no RTOS)

    This question is not answered
    Heesoo Ahn
    Posted by Heesoo Ahn
    on Aug 13 2012 22:23 PM
    Prodigy120 points

    Hi, it is as is, my lm3s9d92 keep getting bus fault while executing echo server routine. After it registers an accepting callback function, it goes to 'waiting' state. 

    I used TCP test tool to connect to the board, which in turn causes receive interrupt in my server routine.

    (I've tried to write the initialization process almost same as the example 'enet_lwip' from stellarisware. I've put out locator functions and used static IP address. Yes, I am aware of endianness in case of writing ip address, and my pc is in the same subnet with the board)

    Whenever I click 'connect' button in waiting state, it immediately goes to FAULT ISR, and I don't know the reason why.

    I've tried to track this. through a long series of debugging process, I found that all the fault is coming from the same line of the code, which is the one highlighted below

    static err_t
    stellarisif_transmit(struct netif *netif, struct pbuf *p)
    {
    int iBuf;
    unsigned char *pucBuf;
    unsigned long *pulBuf;
    struct pbuf *q;
    int iGather;
    unsigned long ulGather;
    unsigned char *pucGather;

    /**
    * Fill in the first two bytes of the payload data (configured as padding
    * with ETH_PAD_SIZE = 2) with the total length of the payload data
    * (minus the Ethernet MAC layer header).
    *
    */
    *((unsigned short *)(p->payload)) = p->tot_len - 16;


    the fault is caused right after that line by using step by step approach, and as I looked into nvic registers, I could see that the precise data bus fault bit was high. but I have no clue what this precise data bus fault is and what could be the cause of this fault so I'm in a loss. If there's anyone who could give me some good guidelines about this matter, I would be most grateful.

    thx for reading this.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Stellaris Mitch
      Posted by Stellaris Mitch
      on Aug 14 2012 10:49 AM
      Intellectual2170 points

      Hello Heesoo Ahn,

      I believe you will find the "Diagnosing Software Faults in Stellaris Microcontrollers" application note (http://www.ti.com/lit/an/spma043/spma043.pdf) quite helpful. It is a good starting point and perhaps will allow you to find the cause. If you are still stuck, please let us know what you do find using that information and perhaps we can help further.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Heesoo Ahn
      Posted by Heesoo Ahn
      on Aug 15 2012 01:13 AM
      Prodigy120 points

      thx, that helped a lot in clarifying the issue. But again, I ran into another problem.

      When i run the program with breakpoints in stellarisif.c the board gets bus faults with precise point of address. the address i got from the debugger was 0x00FF0468, which was clearly out of bounds of flash or any other mapped memory areas.

      Then I tried running the program without breakpoints(besides the one on the fault isr), however ends in fault isr when I try to connect with TCP test tool, and came out with interesting result. this time the case was invalid state fault and as I tried to track down latest address where PC was pointing, I ended up finding it in SRAM heap area(0x20001980). this got more puzzling than what it was like in the first place!

      If it was related with not enabled peripheral, this would be rather easy. But this... brings me to my wit's end.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • slandrum
      Posted by slandrum
      on Aug 15 2012 18:43 PM
      Mastermind9510 points

      Try increasing the stack size for your project.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Heesoo Ahn
      Posted by Heesoo Ahn
      on Aug 19 2012 10:17 AM
      Prodigy120 points

      been there, and done it. ended with no good results, I think the problem resides elsewhere.

      I edited startup_ccs.c file to modify stack size up to 1024, 2048, 4096(bytes, I suppose). The default setting was 256 bytes, and enet_lwip example used 1024 bytes. However, it changed nothing.

      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