[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] lwIP hangs after some data transferred
From: |
Grzegorz Niemirowski |
Subject: |
Re: [lwip-users] lwIP hangs after some data transferred |
Date: |
Sat, 4 Oct 2014 17:54:20 +0200 |
Grzegorz Niemirowski <address@hidden> napisaĆ(a):
I'm still fighting with the problem. The stack hangs on fetching packets
from mbox. I have tried following code (added printfs):
printf("fetch %u\n", num++);
sys_timeouts_mbox_fetch(&mbox, (void **)&msg);
printf("OK\n");
And I get "fetch 2272" without "OK".
Further analysis gave following observations:
- thread blocks on fetch because packets are no longer inserted into mbox
- packets are not inserted because the ETH interrupt is no longer raised
- there is no interrupt because reception is suspended, set bits in the
DMASR register show:
RPS bits: 100: Suspended: Receive descriptor unavailable
RBUS bit: Receive buffer unavailable status
Descriptors are freed inside low_level_input after PBUF has been allocated
and incoming packet has been copied. But it happens that pbuf_alloc returns
NULL. What could be the reason? The traffic is not big, just a few kB/s.
Maybe there is not enough space for PBUFs, but the problem doesn't occur
immediately, usually a few thousand packets are transmitted without any
issue before the stack stalls.
Best regards,
Grzegorz Niemirowski
- Re: [lwip-users] lwIP hangs after some data transferred,
Grzegorz Niemirowski <=