Hot!Ethernet Troubleshooting

Page: 12 > Showing page 1 of 2
Author
matta
Junior Member
  • Total Posts : 118
  • Reward points : 0
  • Joined: 2006/11/15 14:05:02
  • Location: 0
  • Status: offline
2017/11/09 09:17:25 (permalink)
0

Ethernet Troubleshooting

I have a board with pic32mz that uses a LAN8720A phy device for ethernet. I have assembled and tested a prototype and the ethernet stack is working as expected. I then had some boards fabricated/assembled for me and when testing them the ethernet is broken(with the exact same code). So I guess I'm fishing for some advice if anyone knows where in hardware these symptoms point to.
 
When booting the link led stays solid and the action line never blinks. When inspecting things through the command console I get all zeros.
Interface: PIC32INT driver statistics
        nRxOkPackets: 0, nRxPendBuffers: 0, nRxSchedBuffers: 4, nRxErrorPackets: 0, nRxFragmentEr0
        nTxOkPackets: 0, nTxPendBuffers: 0, nTxErrorPackets: 0, nTxQueueFull: 0
Interface: PIC32INT hardware statistics
        FRMTXOK : 0x       0
        FRMRXOK : 0x       0
        RXBUFCNT: 0x       0
        RXOVFLOW: 0x       0
        FCSERROR: 0x       0
        SCOLFRM : 0x       0
        MCOLFRM : 0x       0
 
Here is a dump of the registers on my LAN8720A on the non-working hardware.
 
Miim Dump Reg: 0, add: 0, val: 0x1000
Miim Dump Reg: 1, add: 0, val: 0x7809
Miim Dump Reg: 2, add: 0, val: 0x   7
Miim Dump Reg: 3, add: 0, val: 0xc0f1
Miim Dump Reg: 4, add: 0, val: 0x de1
Miim Dump Reg: 5, add: 0, val: 0x   1
Miim Dump Reg: 6, add: 0, val: 0x   1
Miim Dump Reg: 7, add: 0, val: 0xffff
Miim Dump Reg: 8, add: 0, val: 0xffff
Miim Dump Reg: 9, add: 0, val: 0xffff
Miim Dump Reg: 10, add: 0, val: 0xffff
Miim Dump Reg: 11, add: 0, val: 0xffff
Miim Dump Reg: 12, add: 0, val: 0xffff
Miim Dump Reg: 13, add: 0, val: 0xffff
Miim Dump Reg: 14, add: 0, val: 0xffff
Miim Dump Reg: 15, add: 0, val: 0x   0
Miim Dump Reg: 16, add: 0, val: 0x  40
Miim Dump Reg: 17, add: 0, val: 0x   2
Miim Dump Reg: 18, add: 0, val: 0x60e0
Miim Dump Reg: 19, add: 0, val: 0xffff
Miim Dump Reg: 20, add: 0, val: 0x   0
Miim Dump Reg: 21, add: 0, val: 0x   0
Miim Dump Reg: 22, add: 0, val: 0x   0
Miim Dump Reg: 23, add: 0, val: 0x   0
Miim Dump Reg: 24, add: 0, val: 0xffff
Miim Dump Reg: 25, add: 0, val: 0xffff
Miim Dump Reg: 26, add: 0, val: 0x   0
Miim Dump Reg: 27, add: 0, val: 0x  15
Miim Dump Reg: 28, add: 0, val: 0x   0
Miim Dump Reg: 29, add: 0, val: 0x  90
Miim Dump Reg: 30, add: 0, val: 0x   0
Miim Dump Reg: 31, add: 0, val: 0x  40
I can write the registers and read them back and the values read reflect my changes. It looks like it is failing to auto negotiate but I am struggling to know what in the hardware could cause that issue. I have ohmed out all the connections and they seem the same as on the working board set. Does anyone have an idea what could cause such an issue?
 
 
 
 
 
post edited by matta - 2017/11/09 09:20:12
#1

39 Replies Related Threads

    bblessing
    Super Member
    • Total Posts : 464
    • Reward points : 0
    • Joined: 2008/12/04 06:44:21
    • Location: Cincinnati, OH
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/09 09:45:22 (permalink)
    0
    What is your Harmony setup? I had a problem with that chip as well. Is TCPIP_EMAC_PHY_ADDRESS set to 1? That's the PHY Address. I know that 0, the default for Harmony, should work. It did on one of the boards, but not the others. Also, are you using the chip reset callback? I always reset the chip on power-up. That seemed to help.
    #2
    rainad
    Moderator
    • Total Posts : 832
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/09 11:25:13 (permalink)
    0
    Since the control interface/MIIM seems to work OK, it means that you have an issue on the data interface between the MAC (PIC32) and the PHY - as shown by the hardware statistics.
    - Check that your project fuses configuration: MII/RMII and default/alternate I/O match what really is on the board.
    - Visual inspection of the MAC <-> PHY data bus connections (16/8 wires for MII/RMII).
    Somewhere there is the problem.
     
    #3
    DarioG
    leaving this planet
    • Total Posts : 53071
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/09 11:40:16 (permalink)
    0
    lost post by OP - possibly some famous brand...

    Dario Greggio
    --
    how does it feel, never having been loved? as life fades away, day after day, on this planet made of s h i t...

    #4
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/09 12:28:28 (permalink)
    3 (1)
    @bblessing
    I have
    #define TCPIP_EMAC_PHY_ADDRESS                        0
    I thought that had to do with some of the config straps but I'll definitely go back and take a look.
     
    I haven't reset on power up as it wasn't an issue with the other board, but I'll give that a shot as well.
     
    Here is part of my harmony settings pertaining to the phy
     
     
    @rainad
    It is RMII, I will look very closely at these.
     
    Thanks for your suggestions, I'll give them a try and post back
     
    not sure what is the deal, but the forum seems screwed up...not sure what famous brand means, I'll try without the pasted image...it worked, guess I don't have rights for images or something.
    post edited by matta - 2017/11/09 12:30:19
    #5
    qhb
    Superb Member
    • Total Posts : 6255
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/09 22:10:13 (permalink)
    4 (1)
    matta
    ...
    not sure what is the deal, but the forum seems screwed up...not sure what famous brand means, 

    The famous brand is Apple. Several of their product names trigger the web server firewall, because some numb-nut added them to a brain dead blacklist a few years ago when there was lots of SPAM full of those product names.
    See: Expressions which trigger the firewall 
    #6
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/14 14:56:04 (permalink)
    0
    Anyway, the root cause of this is still eluding me. I am sure that rainad is correct that the RMII lines are somehow to blame. However, I have ohmed every single one of them and they are all correct/the same as my working board. Thanks for your help though, I'll keep looking.
    #7
    RISC
    Super Member
    • Total Posts : 4593
    • Reward points : 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/14 15:10:34 (permalink)
    0
    Hi Matta,
    Which PIC32MZ device do you use (exact reference) ?
    Do you use the standard RMII interface or the alternate RMII interface ?
    Did you submit your design to LANcheck service from Microchip ?  (select "check services" in the support ticket category).
    Your schematic will be reviewed and a report will be generated to list all items which can be improved / corrected to optimize your design
    Regards
    #8
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/14 15:18:53 (permalink)
    0
    I am using pic32mz2048efh064 rev A3
     
    I use the standard RMII interface.
     
    Yes, I used it(pretty impressive by the way) and built a working design. I then had some assembled for me and something has gone wrong (wrong component/bad solder connection/etc.) I am using the exact same firmware as on my prototyped design, so I was just throwing this out there to make sure there wasn't anything silly I was forgetting. I can program the registers in the PHY device fine, but there is no communication otherwise.
    #9
    RISC
    Super Member
    • Total Posts : 4593
    • Reward points : 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/14 15:45:02 (permalink)
    0
    Hi,
    Are you sure that the BOM used to produce the boards in the same as the shematic which was reviewed ?
    Did any component change ? XTAL ? magnetics ? 
    Regards
    #10
    rainad
    Moderator
    • Total Posts : 832
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/14 16:32:49 (permalink)
    5 (1)
    Are you using the "alternate RMII" setting?
    This doesn't work on a 64 pin part.
    Take a look at this thread:
    http://www.microchip.com/forums/m1013349.aspx
     
    #11
    mrpackethead
    packet mangler
    • Total Posts : 777
    • Reward points : 0
    • Joined: 2007/04/01 23:33:39
    • Location: 0
    • Status: online
    Re: Ethernet Troubleshooting 2017/11/14 20:31:15 (permalink)
    0
    rainad
    Are you using the "alternate RMII" setting?
    This doesn't work on a 64 pin part.
    Take a look at this thread:
    http://www.microchip.com/forums/m1013349.aspx
     


    has that been confirmed?
    #12
    mrpackethead
    packet mangler
    • Total Posts : 777
    • Reward points : 0
    • Joined: 2007/04/01 23:33:39
    • Location: 0
    • Status: online
    Re: Ethernet Troubleshooting 2017/11/14 20:41:33 (permalink)
    3 (1)
    One of the 'classic' issues with the LAN8720 is that it really needs a very good ground connection.  And this seems to be difficult for some people to achieve.  ( it needs to be stencilled, placed and reflowed reliably ).   Measure pin 6 wrt to gnd and see what voltage you get.   you need to be 1.25V +/- just a tiny bit.  If your not in that range then you almost certianly have a constrution issue.
     
    #13
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/15 07:32:06 (permalink)
    0
    RISC
    Hi,
    Are you sure that the BOM used to produce the boards in the same as the shematic which was reviewed ?
    Did any component change ? XTAL ? magnetics ? 
    Regards


    As far as I am aware they are identical. I will go back and compare them again though because always there are some substitutions to be made based on part availability.
    rainad
    Are you using the "alternate RMII" setting?
    This doesn't work on a 64 pin part.

    That is interesting, I had not read that...but no I am using the standard interface.
    mrpackethead
    One of the 'classic' issues with the LAN8720 is that it really needs a very good ground connection.  And this seems to be difficult for some people to achieve.  ( it needs to be stencilled, placed and reflowed reliably ).   Measure pin 6 wrt to gnd and see what voltage you get.   you need to be 1.25V +/- just a tiny bit.  If your not in that range then you almost certianly have a constrution issue.

    I am thinking it could be something like this.  So much so that I completely removed one LAN8720 and put a new one back on myself(this didn't help though). I was worried that the pad underneath wasn't connected, but there are little nubs in the corners of the IC that are connected to the power pad that measure straight short to ground when the IC is down. I have measured the reference voltage pin before but I didn't realize the tolerance was so tight so I will check it again. I was thinking I got like 1.3 or something like that.
     
     
    Thanks for all your ideas
    #14
    mrpackethead
    packet mangler
    • Total Posts : 777
    • Reward points : 0
    • Joined: 2007/04/01 23:33:39
    • Location: 0
    • Status: online
    Re: Ethernet Troubleshooting 2017/11/15 12:45:34 (permalink)
    0
    It shoudl be between +1.14 V to +1.26 V   If you are outside that range then you will potentially have problems. It may be layout related, and you just got lucky with the prototype.
     
     
    #15
    RISC
    Super Member
    • Total Posts : 4593
    • Reward points : 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/15 22:31:15 (permalink)
    5 (1)
    Hi,
    I'm also thinking about the magnetics (generally included into the RJ45 connector).
    There are various transformer ratios out there and this is critical to be matched with the PHY.
    I remember that issue from an old ENC28J60 design
    Regards
    #16
    mrpackethead
    packet mangler
    • Total Posts : 777
    • Reward points : 0
    • Joined: 2007/04/01 23:33:39
    • Location: 0
    • Status: online
    Re: Ethernet Troubleshooting 2017/11/15 22:56:28 (permalink)
    0
    Yes, that is critical.  For most of my designs, im using seperate magnetics but thats a differnet topic!   But i learned this the hard way.  
    #17
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/16 13:46:00 (permalink)
    0
    So you are right...on the working board that I populated by hand the VDDCR is 1.23, and on one of the professionally assembled boards it is 1.65. Do you know of anywhere that this problem is discussed so I can read about it and try to determine root cause?
    #18
    RISC
    Super Member
    • Total Posts : 4593
    • Reward points : 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/16 14:11:57 (permalink)
    3 (1)
    Hi,
    The LAN8720 datasheet says that if internal regulator is used 1uF & 470pF caps must be put on the VDDCR pin.
    do you use internal or external reguator ?  is should be around 1.2V
    The choice for internal external regulator is done using external circuitry. See section 3.8.1.1 from the datasheet. 
    Regards
     
     
    #19
    matta
    Junior Member
    • Total Posts : 118
    • Reward points : 0
    • Joined: 2006/11/15 14:05:02
    • Location: 0
    • Status: offline
    Re: Ethernet Troubleshooting 2017/11/16 14:33:35 (permalink)
    0
    Hello,
    I am using the internal regulator and have the capacitors there. I would show you the schematic but every time I try to attach an image it tells me access denied or just loses my post.
     
     
    I just replaced the VDDCR decoupling capacitors with ones identical to the working prototype but it didn't change the voltage I'm seeing on VDDCR (1.67 Volts)
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2017 APG vNext Commercial Version 4.5