lpc1788 MAC reset issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc1788 MAC reset issue

740 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sposelenov on Fri Dec 02 06:36:45 MST 2011
Hello,

I installed the pre-built LPC1788 U-Boot binaries on my EA-LPC1788 board, and configured the "bootcmd" to auto-boot an image over network.

I noted that U-Boot hangs in MAC driver after the board is soft-reset (i.e. via "reset" or "cmreset" U-Boot commands). Only power of/on or pushbutton reset works.

Investigation showed that U-Boot hangs in the first MAC register write after the resetting MAC logic in board/nxp/ea1788/net.c:lpc17xx_hw_init():
...
        /* Reset all MAC logic */
        __raw_writel(0xCF00, MAC_MAC1);
        __raw_writel(0x0038, MAC_COMMAND);
        msDelay(10);

        /* Initial MAC initialization */
        __raw_writel(0x0002, MAC_MAC1);
^^^^^^^^^^^^^^^ Hangs here ^^^^^^^^^^^^^^^^^
        __raw_writel(0x0030, MAC_MAC2);

...

Has anyone noted this bug? Can it somehow be fixed in software or is it an LPC1788 bug?

Thanks in advance,
Sergei
Labels (1)
0 Kudos
4 Replies

547 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Oct 22 17:53:08 MST 2013
For designers who have EMAC problems when an *INTERNAL* (I.e. software) reset is issued ...

We measured the duration of the low level on RST_OUT (which we connected to the reset input
of the LAN8720A) to be about 1.25 uSec (if memory serves).

The datasheet for the LAN8720 indicates a minimum reset length of 100 uSec.

You see the problem?

We are holding off a PCB re-spin as yet, but will add one of two strategies:

(a) most portable -- connect instead, a spare GPIO pin the LAN8720 and issue a software controlled
reset before EMAC init code.

(b) automatic (We have an FPGA in the design) -- use the short RST_OUT pulse as an input to the FPGA which
will trigger a much longer pulse on a spare FPGA pin connected to the LAN8720 reset.

I hope this helps someone.
0 Kudos

547 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Sun Aug 04 12:12:30 MST 2013

Quote: chris.stocker
We have seen a similar issue in the past with both the LPC2478 and LPC1788. When the EMAC is turned on but the MCU is unable to communicate with the Ethernet PHY the system will lock up. If there is a PHY attached you should check to make sure the hardware is properly connected and working. If you do not have a PHY attached then it would be best to turn the EMAC off and not try to initialize it.

To make our uEZ(R) software more robust we added logic to the EMAC driver to detect the PHY by bitbagging data to it and looking for the proper response, if it is not detected then the software does not initialize the EMAC. The uEZ source code is open source and available for download at the link below.

http://sourceforge.net/projects/uez/

Chris Stocker
Future Designs, Inc.
www.teamfdi.com



I am running into this problem too.
And whilst your post is informative, it is not responsive.
Obviously the PHY chip does not vanish or change its tracking just because
there is an internal rather than power-on reset.

When I next have time to get back to this issue, I intend to experiment with
bit-banging to the PHY device (LAN8720a) to do a PHY reset (and possibly auto-negotiation)
*before* enabling power to the embedded EMAC.

Do you have any *relevant* comments or experience to share?

Regards, Mike








0 Kudos

547 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by chris.stocker on Thu Jul 25 06:49:37 MST 2013
We have seen a similar issue in the past with both the LPC2478 and LPC1788. When the EMAC is turned on but the MCU is unable to communicate with the Ethernet PHY the system will lock up. If there is a PHY attached you should check to make sure the hardware is properly connected and working. If you do not have a PHY attached then it would be best to turn the EMAC off and not try to initialize it.

To make our uEZ(R) software more robust we added logic to the EMAC driver to detect the PHY by bitbagging data to it and looking for the proper response, if it is not detected then the software does not initialize the EMAC. The uEZ source code is open source and available for download at the link below.

http://sourceforge.net/projects/uez/

Chris Stocker
Future Designs, Inc.
www.teamfdi.com
0 Kudos

547 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ragavendrapec on Thu Apr 19 18:57:13 MST 2012
Hi
I am facing a similar problem. did u happen to resolve the issue? Plz reply. I am using a LPC2468 board from Embedded artists. i am trying to set a value of 0 to mac_mac1 it hangs. my suspicion was with the mac_command register value. but i'm not sure what's causing the issue. Plz reply if u happen to resolve it.
0 Kudos