Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
You are viewing an older revision! See the latest version
Homepage
After reading topic http://mbed.org/forum/mbed/topic/3684/?page=1#comment-18473, i created the lpc_phy_DM9161A.c file (used lpc_phy_lan8720.c as a template).
Partially working¶
Auto negotiation and DHCP are OK - ethernet communication is not working.
There seems to be a communication problem between the EMAC and PHY (timing?). Any ideas on how to resolve this issue are welcome.
A debug log is available at /media/uploads/frankvnk/tcpsocket_helloworld_with_dm9161a_phy_-_debug_log.txt
How to test¶
import http://mbed.org/users/mbed_official/code/TCPSocket_HelloWorld/ into the mbed compiler.
Goto folder EthernetInterface\lwip-eth\arch#
Delete lpc_phy_dp83848.c
.
Copy lpc_phy_DM9161A.c
into this folder.
Add following MAC address definition in main.cpp (before 'EthernetInterface eth;').
extern "C" void mbed_mac_address(char * mac) { // define your own MAC Address mac[0] = 0x00; mac[1] = 0x1F; mac[2] = 0x33; mac[3] = 0x42; mac[4] = 0xFC; mac[5] = 0x6F; };
When used with the Mini-DK hardware
Modify EthernetInterface\lwip-eth\arch\lpc_emac_config.h
:
Change #define LPC_PHYDEF_PHYADDR 1
to
#define LPC_PHYDEF_PHYADDR 19
On the Mini-DK, sometimes no IP address is obtained when the 'Reset' button is pressed after programming the device. Disconnect and reconnect the device and press the 'Reset' button again to restart.