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

显示  仅  | 搜索替代 

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

3,738 次查看
NXP Employee
NXP Employee
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 -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:
IntStatus =0

Interrupt registers:

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.
标签 (1)
6 回复数

2,858 次查看
Contributor II


Just reading the code (I did not run into this bug), I simply noticed that the RXRESET bit is not applied to the COMMAND register, which should be according to the datasheet.

I mean something like this is missing:


It is not in the Chip_ENET_ResetRXLogic() function which only resets the MAC part.

Not tested though.

2,858 次查看
Contributor I

I' ve tested this applications on my own board with LPC1768, same problem. I tried to contact directly NXP, But I couldn't get any responce from my NXP contact . (We are using this controller with another projects (without ethernet) and we are consume more than 10Kpsc/year) Dissapointment!

0 项奖励

2,858 次查看
NXP Employee
NXP Employee

Hi Selami,

Are you using a custom base board with Ethernet PHY with your lpc1768 MCU? Do you have other LPC176x board which can be used for the Ethernet test?

You could try to use our lpc175x_6x CMSIS driver library to test if there is the same issue. The EMAC driver in the software platform don't use LWIP.  Here is the link:


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 项奖励

2,858 次查看
Contributor I

Dear Carlos,

I have performed test “LPCXpresso 1769 with CMSIS-DAP Evaluation board” from NXP first. And then I tried my custom board with PCP1768. Result was same. I have used LPCXpresso v8.1.4 IDE and LPCOpen Libraries for LPC17XX V2.10 your software. You can see the details about my problem. All softwares (IDE, source codes) come from NXP, I didn’t make any modification to the source codes.

In my new project I need RTOS and IP, because of that I have to use Freertos and LWIP. When I faced this problem and no answer from you, I seach another solutions. I tried STM32F407 from ST and their STM32Cube software (freertos and lwip), I’m still working on this solution without any problem.

Thanks and regards.

S. Selami CANDAR

MSc in Electronics

R&D Manager

Adam ArGe Haberlesme Teknolojileri

Arastirma Gelistirme Ltd.

Phone : (90) 262 6787245

email : selami.candar@adam.com.tr<mailto:scandar@adam.com.tr>

Kimden: Carlos_Mendoza

Tarih: 30 Ağustos 2016 Salı 02:03

Kime: Selami CANDAR <scandar@adam.com.tr>

Konu: Re: - LPC1769 LPCOpen ethernet applications (lwip_tcpecho, webserver) have a problem on load.

NXP Community <https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

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

reply from Carlos_Mendoza<https://community.nxp.com/people/Carlos_Mendoza?et=watches.email.thread> in LPC - View the full discussion<https://community.nxp.com/message/826827?commentID=826827&et=watches.email.thread#comment-826827>

0 项奖励

2,858 次查看
NXP Employee
NXP Employee
0 项奖励

2,858 次查看
NXP Employee
NXP Employee
Content originally posted in LPCWare by S_Candar on Tue Jun 14 04:30:51 MST 2016
Another issue :

I want to reset the Ethernet RX side when the rx side frezzes. There is a code part for do this in arch/lpc17xx_40xx_emac.c :

      /* Temporarily disable RX */

      /* Reset the RX side */

      /* De-allocate all queued RX pbufs */
      for (idx = 0; idx < LPC_NUM_BUFF_RXDESCS; idx++) {
         if (lpc_enetif->rxb[idx] != NULL) {
            lpc_enetif->rxb[idx] = NULL;

      /* Start RX side again */

      /* Re-enable RX */

This code runs when rx overrun error occurs. I tried to run this code part when rx side freeze to re-enable the rx side, it doesn't work. I tried to run this code when rx side was normal, rx side froze.  Accualy, this code never run normaly. (no overrun error at 120Mhz) But I think there is a bug for this reset mechanism.
0 项奖励