cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107, LwIP and Maximal TCP Packet Reception

altsir
Associate
Posted on May 18, 2013 at 20:21

Hi All!

I am trying to run the LwIP code example with STM32F107 (LwIP ver 1.3.1) and I have faced the following issue - I am not able to receive the maximal allowable TCP fragment (1460 bytes) - the last 14 bytes are always corrupted. It seems like once and the complete Ethernet frame is more than 1500 byes, I have errors in TCP packet. The strange thing is that 1472 bytes long ping is working fine. 

The solution I found to the problem is increasing the

PBUF_POOL_BUFSIZE

to 1514 bytes.

Is there some hidden bug in the example or I am just doing something wrong?

Thanks,

Alexey.

#stm32 #lwip
1 REPLY 1
dimax
Senior
Posted on May 26, 2013 at 11:56

HI,

I'm just working on the lwIP porting to my STM32F2x7 platform. As far as I can see the STM32 port is buggy. (I don't mention that it's source code is ugly). One of the bugs I can see is no treatment of the Receive Buffer wraparound. If received frame is stored in two DMA descriptors and first descriptor is last descriptor in chain (hence second is first descriptor in chain) the buffer will wrap around. Maybe your problem is related to this issue. More likely ST32 port code is not good for frames bigger then one buffer.