lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwip hanging on memory allocation (sem)


From: DownyTif
Subject: [lwip-users] lwip hanging on memory allocation (sem)
Date: Wed, 28 Jan 2009 14:17:12 -0800 (PST)

Hi,

I would like to know if someone ever came into this problem...
I have a little application developped on the Atmel EVK1100 product, using
the FreeRTOS and lwip with the sequential API.

My application is running fine when I'm using the clocks at 48MHz (CPU, HSB,
PBB, while PBA is 12MHz). When I change the clocks to 66MHz (CPU, HSB, PBB,
while PBA is 33MHz), the lwip configuration hangs on a semaphore here:

\lwip-1.2.0\src\core\mem.c LINE 274.
sys_sem_wait(mem_sem);

The stack looks like this:
10 _handle_Data_Address_Read()  0x80018a34

9 xQueueGenericReceive() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\FREERTOS\Source\queue.c:843
0x8000d9b4
        
8 sys_arch_sem_wait() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-port\AT32UC3A\sys_arch.c:247
0x8000048c
        
7 sys_sem_wait() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.2.0\src\core\sys.c:119
0x8000798a
        
6 mem_malloc() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.2.0\src\core\mem.c:274
0x80009162
        
5 ethernetif_init() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-port\AT32UC3A\ethernetif.c:358
0x80000b2e
        
4 netif_add() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.2.0\src\core\netif.c:92
0x800086ee
        
3 EthernetConfigInterface() C:\Projets\AVR
Workspace\EthernetBenchTest\Ethernet.c:283 0x80010732
        
2 tcpip_thread() C:\Projets\AVR
Workspace\EthernetBenchTest\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.2.0\src\api\tcpip.c:115
0x8000ad00
        
1 <symbol is not available> 0xdeadbeef

So, to resume, the tcpip_init() call creates a thread which calls my
function for ethernet configuration, which calls "netif_add(...)" --->
"init(netif)" ---> ethernetif = (struct ethernetif
*)mem_malloc(sizeof(struct ethernetif)); ---> the mem_alloc semaphore.


I'm kind of confused, because everything works fine at 48MHz and the board
is supposed to support up to 66MHz. I've seen posts of people using the same
board at 66MHz, so it's probably not related to lwip, but I'm taking a
chance.

Any hints will be welcome!

Thanks,
Downy
-- 
View this message in context: 
http://www.nabble.com/lwip-hanging-on-memory-allocation-%28sem%29-tp21716313p21716313.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

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