Content originally posted in LPCWare by padmaja on Wed Feb 03 01:33:02 MST 2016
hi,
With LPC1788 + LAN8720, we have to communicate using MAC id only or we can communicate with IP address also? I have probe using CRO and checked all ENET connections. some data is going through TXD0,TXD1,RXD0,RXD1. but in code nothing is happening means no interrupts was generated.
Another thing i was observed is ENET registers map address starts from 0x20084000. when i power enable ENET in PCONP register,ENET registers contained total memory is filled with 0xaaaaaaaa(observed in memory browser). Means is any other thing was disturbing ENET?
but if i write into registers and read at that time its values are valid. But main problem is how do i know initialization part is successfully done?
i saw magic packet in reference manual of lpc1788, Is magic packet was send from device(LAN8720) to host or host must be send magic packet to device?
please anyone clarify me, i really confusing mac address part also in some example they provided
/* Ethernet MAC address to use (default). */
#define emacMACADDR0 0x00
#define emacMACADDR1 0xBD
#define emacMACADDR2 0x33
#define emacMACADDR3 0x06
#define emacMACADDR4 0x68
#define emacMACADDR5 0x22
iMACAddress[0] = emacMACADDR0;
iMACAddress[1] = emacMACADDR1;
iMACAddress[2] = emacMACADDR2;
iMACAddress[3] = emacMACADDR3;
iMACAddress[4] = emacMACADDR4;
iMACAddress[5] = emacMACADDR5;
state-----------------------------------------1
LPC_EMAC->SA0 = (p->iSettings.iMACAddress[5] << 8)
| p->iSettings.iMACAddress[4];
LPC_EMAC->SA1 = (p->iSettings.iMACAddress[3] << 8)
| p->iSettings.iMACAddress[2];
LPC_EMAC->SA2 = (p->iSettings.iMACAddress[1] << 8)
| p->iSettings.iMACAddress[0];
state--------------------------------------------------2
But in document (UM10470.pdf) they mentioned
SA0[15:8] = 1st octet
SA0[7:0] = 2nd octet, etc.
if these bothe statements are true then 1st octet is emacMACADDR5 right?
if we want to send packets to host our packet format is <des add> <src add><opt VLAN><len> <paylod><FCS>
destination address octet 1 is stating from lsb to msb (bit-0 to bit-7),so we have to re-frame MAC addresses right?
thanks & regards,
padmaja m.