LPCxpresso compatibility

02 Jul 2012

I know that the LPC1769 on the LpcXpresso is code compatible with the 1768 on mbed. I was wondering though if anyone knew wither or not the Ethernet PHY on LPCxpresso worked with mbed code. Mbed uses DP83848J PHY Xpresso uses Lan8720 PHY , because the use the RMII interface will Ethernet code written on Mbed work on LPCXpresso1769 board?

02 Jul 2012

Maverick War wrote:

I was wondering though if anyone knew wither or not the Ethernet PHY on LPCxpresso worked with mbed code. Mbed uses DP83848J PHY Xpresso uses Lan8720 PHY , because the use the RMII interface will Ethernet code written on Mbed work on LPCXpresso1769 board?

Almost: it is going to require some changes.

The official mbed IP networking library is actually using the Ethernet driver from the NXP MCU SW Application Team.

As you can see there is a common interface for the PHY: lpc_phy.h

The mbed library is using the lpc_phy_dp83848.c implementation, if you want to use the networking library in the LPCxpresso, you have to swap the implementation with lpc_phy_lan8720.c.

Just as a summary, the mbed IP networking library is using the following components:

Cheers, Emilio

02 Jul 2012

A bit over my head , My C/C++ is rubbish so i'm not sure whats calling what there :) I see the include in lpc_phy_dp83848.c to lpc_phy.h , but im guessing just dropping in lpc_phy_lan8720.c instead ain't gonna cut the mustard ? I will take it as a no for now and hit the books harder :) As it looks like a new implementation too (been using Donatien's code to play so far) it will take some time to study nice that there seems to be a definitive common library now tho :) Thank you very much for the response Emilio.

03 Jul 2012

Hi Maverick,

Maverick War wrote:

A bit over my head , My C/C++ is rubbish so i'm not sure whats calling what there :) I see the include in lpc_phy_dp83848.c to lpc_phy.h , but im guessing just dropping in lpc_phy_lan8720.c instead ain't gonna cut the mustard ?

You understood it correctly, you just need to substitute lpc_phy_dp83848.c with lpc_phy_lan8720.c.

Cheers, Emilio

03 Jul 2012

Oh so it is as easy as substituting the one file after all :) Thank you very much again Emilio for that info. I'm looking at xpresso1769 just as a cheaper board option for semi permanent projects that don't need the mbed interface chip.

03 Jul 2012

I've started doing this with my projects, prototype the hardware design with the Mbed and then build an LPCxpresso board into the project when ready. Although, I've not used Ethernet for anything yet...

Matt

22 Nov 2012

I got the Ethernet working on the LPCexpresso , just like Emilio directed , was quite chuffed as I am a C++ noob. I posted a working example a while ago since then the interface has changed again and broken it ! I have just recompiled a working version based on the latest updates no problem.

19 Jan 2013

Is it possible to use abovementioned changes (replacing lpc_phy_dp83848.c) with other PHYs? I created code for the DM9161A PHY - got autonegotiation and DHCP working but ethernet communication seems to get stuck. Project info can be found at http://mbed.org/users/frankvnk/notebook/lpc1768-mini-dk/ - item 'DM9161 Ethernet CODE - Networking, lwip based (19/01/13)'.