lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip 1.2.0 + freeRTOS


From: Sirjee Rooplall
Subject: Re: [lwip-users] lwip 1.2.0 + freeRTOS
Date: Tue, 26 Jan 2010 16:07:27 +0200

Well, I need to confirm that data corruption is not the case or is the case either way I need to confirm this.
Its a tough one to catch.

When we allocate memory for the lwip stack i.e MEM_SIZE 4*1024, found in lwipopts.h, is there a way to protect this memory area that is allocated to the stack?


Kind Regards, Sirjee Rooplall Figment Design laboratories (Pty) Ltd mailto: address@hidden Mobile: +27 (0)83 230 8466 ----- Original Message ----- From: "FreeRTOS Info" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Tuesday, January 26, 2010 3:36 PM
Subject: Re: [lwip-users] lwip 1.2.0 + freeRTOS


Sirjee Rooplall wrote:
I use ATMEL UC3 software framework + ppp on UC3A0512 device with
external SDRAM as heap.

Whenever it crashes, i.e no other task seem to be running, I have an LED
task that flashes the LEDS which stops.

If I stop the AVR32Studio debugger, I see that it always stops at
QueueReceive, and tracing back, sys_arch_mbox_fetch last called, and it
fails in the function: in the line pointed out below

The other way I can simulate this promlem is that I establish a
connection, then I remove the antenna, hence no physical connection to
the server, and I trigger a new connection using external trigger which
will try and do a netconn_connect.
netconn_connect then blocks for about 20 seconds or so, and returns with
ERR_ARBT(-3), I then retry another netconn_connect and same timeout and
same error, now when I connect the antenna back again and establish my
physical layer connection and then I try to establish a TCP connection
using netconn_connect again, it fails in the same way as descibed above.

static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void
*pvBuffer )
{
if( pxQueue->uxQueueType != queueQUEUE_IS_MUTEX )
{
 pxQueue->pcReadFrom += pxQueue->uxItemSize;
 if( pxQueue->pcReadFrom >= pxQueue->pcTail )
 {
  pxQueue->pcReadFrom = pxQueue->pcHead; // ***** FAILS HERE ****
 }
 memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned
) pxQueue->uxItemSize );
}
}

I think I did request this information when you first said it crashed in
that function....


I would guess you have a simple data corruption.  Has something written
over the queue data structure?  Is pxQueue valid?


Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.  More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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