6 years, 12 months ago.

EA LPC4088 UDP Socket

Hello,

this is again related to my port from LPC1768 to EA LPC4088 QS Board.

Network communication with TCPSocket is working fine on the LPC4088, but I noticed the NTPClient couldn't synch anymore. Since the NTPClient is working with the UDPSocket I went back to the UDPSocket - HelloWorld. I noticed that the program is working fine with the LPC1768, but loading it to the LPC4088 I couldn't log anything at the computers ethernet port and neither could I ping the LPC4088. The "sock.sendTo(...)" function returns the correct number of bytes that should be send.

I'm working with fixed IP-configuration, and the network setting for both boards where exactly the same. Are there any known issues with UDP and the LPC4088?

Thanks for your help!

1 Answer

6 years, 12 months ago.

Hi Hannes,

This might be related to general networking problems introduced with the latest mbed library. In the latest library the scatter file (linker file) was modified. The peripheral RAM was divided into two (16KB) sections to support both USB and Ethernet at the same time. Previously it was one 32 KB section. What wasn't discovered was that the networking stack (lwip) use 16KB for its memory pool, but also need < 200 bytes for some EMAC driver data. Since all 16KB has already been used the driver data is put in main SRAM by the linker (at the moment I don't know why this happes. Was expecting a link error).

Everything will compile, but networking won't work since the Ethernet block doesn't have access to main SRAM (only peripheral RAM). We will have a look at this and make sure a fix is provided as soon as possible. Meanwhile a possible workaround is to use an older version of the mbed library (I've tested with revision 70)

  1. Click on the mbed library and then the Revisions button in the Library Details view.
  2. Click on revision 70 in the list and then the Switch button.

If you are using the EthernetInterface library (lwip) you could instead change MEM_SIZE to 15360 bytes.

  • You find MEM_SIZE in EthernetInterface / lwip / lwipopts.h

Andreas @ Embedded Artists

Accepted Answer

Revision 70 worked fine - I updated all libraries before switching to the LPC4088 and this caused the problem. Could you give an announcment once it's possible to update the libraries again?

Thanks for the quick support, this is making mbed a great platform :)

posted by Hannes Schenk 06 Dec 2013