AnsweredAssumed Answered

LPC1769 LPCOpen ethernet applications (lwip_tcpecho, webserver) have a problem on load.

Question asked by lpcware Employee on Jun 15, 2016
Latest reply on Aug 30, 2016 by Selami CANDAR
Content originally posted in LPCWare by S_Candar on Mon Jun 13 00:40:58 MST 2016
I' m using LPCXpresso 1769 with CMSIS-DAP Evaluation board and LPCXpresso v8.1.4. I've downloaded LPCOpen Libraries for LPC17XX V2.10

I have been testing Ethernet applications with lwip IP stack. I have tested with and without freeros versions. (lwip_tcpecho, webserver)

I have a common problem at all examples. Applications start to run normaly as expected. But at a bit IP traffic, Ethernet MAC lock. This problem can easily regenerate. You can use ping command for do this. (I'm using "ping 122.122.122.75 -n 10000 -l 10000" command, problem will appear in a minute. Or you can re-load web page 50-100 times in webserver)

In problem case, everything normal except ethernet. (in freertos version all task running) Ethernet MAC is acting like nothing has come. (Transmit continue normaly) All ethernet registers seems normal. You can find register dump in this case.

Ethernet Registers:
Mac1=3
Mac2=31
Command=643
Status=1
RxStatus=10000bb8
RxDescriptorNumber=3
RxConsumeIndex=0
RxProduceIndex=0
TxStatus=10000bf8
TxDescriptorNumber=3
TxConsumeIndex=0
TxProduceIndex=0
RxFliterCtrl=22
IntStatus =0
IntEnable=bb
PowerDown=0

Interrupt registers:
ISER=10400422
ISPR=20010000
IABR=0

As you can see RxConsumeIndex and RxProduceIndex is same so the receive buffer is empty. In this case RxConsumeIndex and RxProduceIndex (this register have to increase) do not change. I checked ethernet phy outputs, there are receive activity. Also I've checked this problem with another hardware, results are same.

I think there is a bug in LPC17xx/40xx LWIP EMAC driver.

Outcomes