[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP on TM4C1294 Connected Launchpad - TCP/IP Problems

From: Bryan Womack
Subject: Re: [lwip-users] lwIP on TM4C1294 Connected Launchpad - TCP/IP Problems [Solved]
Date: Tue, 6 Oct 2015 15:39:54 -0700

Sorry for spamming this mailing list. I feel however that it could be useful for someone in the future experiencing the same issue as me if I document the solution.
It turns out there was most likely some form of stack overflow occurring in the program, although the fault registers did not point to this. By chance, in CCS I decided to increase my stack size from 512 to 1024 and now everything is working as expected.
To access the stack size setting:
- Right click the project in CCS
- Go to properties
- Go to the ARM linker tab
- Go to Basic Options
- Adjust the settings as explained above

From: address@hidden
To: address@hidden
Subject: RE: lwIP on TM4C1294 Connected Launchpad - TCP/IP Problems
Date: Tue, 6 Oct 2015 14:21:20 -0700

Upon further debugging and examination of the registers when the hard fault is triggered I found that there is a data bus error occurring.
lwIP pretty consistently attempts to access the same memory location that is not within the CPU's address space, which is triggering a hard fault.
Is there any way to fix this issue? I am already using up 100% of my available SRAM

From: address@hidden
To: address@hidden
Subject: lwIP on TM4C1294 Connected Launchpad - TCP/IP Problems
Date: Mon, 5 Oct 2015 16:07:20 -0700

Hey all,
I have been working on some code for this Tiva C series Launchpad  and I have been running into some issues. My goal is to have a TCP server running on the embedded system that opens a connection to a single client and then sends a data stream to the client until the client disconnects.
I am using the lwIP raw API and I have pieced together some example code into something that I feel should be working, but is not. I am able to send TCP packets to a telnet client and I am observing the throughput using SmartSniff to watch the packets go by. I am only able to get about 7.8 Kilobytes/s...
There is some sort of problem that occurs with the CPU when I try to enqueue a buffer that is larger than ~400 bytes.
The set up is something like this:
Initialize --> Listen for connection --> Accept Connection --> Send data --> (from tcp_sent callback) Send data <--
The data that is being sent is just a static array of unsigned 8-bit integers of a size that I choose. It is strange because the CPU gets a fault interrupt when the previously mentioned array is larger than ~400 bytes. This doesn't make sense to me because my max segment size is much greater than 400 bytes (1460 bytes).
Does anyone have an idea of what is going wrong?
For reference, I have attached my lwipopts.h

reply via email to

[Prev in Thread] Current Thread [Next in Thread]