Electronic – ENC28J60 not getting link

debuggingenc28j60ethernet

I use the ENC28J60 MAC+PHY ethernet controller (datasheet) in a fairly standard setup as shown in the schematics below.

I can talk to the ENC via SPI, but I cannot get a link-up when I plug in an ethernet cable.
I am looking for suggestions how to narrow the error down.

My considerations so far:

  • I checked all electrical connections and they seem ok.
  • The MagJack is of this type. I have used a different one (this one) on a different, but working ENC setup. As I have not used this MagJack type before, it raises my suspicions. However the datasheet looks ok for me.
  • The crystal is of this type. The ENC datasheet says it requires the use of a "parallel cut" crystal. I am not sure if my crystal fulfills this requirement.
  • I use hand-soldered 0201 size load capacitors. Crazy, I know. The solder joints look ok. But as I cannot test them and they are so small, I suspect them as well.

I am not sure if the fact that I can talk to the ENC via SPI means that the crystal and the load caps work ok. If yes, then the MagJack would be my prime suspect.

So my next steps would be 1. replace the MagJack, if that fails, 2. replace crystal and load caps.

Any suggestions on more probable error causes, or ideas how to narrow the error down would help me greatly.

The schematics:
Schematics

Notes on the schematics:

  • VCC is +3.3V.
  • I connected LEDs for LED A and B tied to GND, not shown in the schematics.

Best Answer

The first immediately obvious problem is the lack of bypass caps. What, you think the laws of physics don't apply to you? Really, this is something very basic and obvious.

You need to connect LEDs to LEDA and LEDB, with the proper series resistor. These are not only indicators, but at least one of them also sets a default depending on whether it is connected to ground or Vdd. I don't remember which LED and what default, but this is all in the datasheet, of course. This would also help you see what is going on. By default, one of the LEDs display link, and I think the other packet activity. A variety of different signals can be displayed on each, which can be selected over the SPI interface.

However, the real problem is you have the transmit and receive interfaces wired backwards. Didn't you look at the datasheet? This should have been one of the obvious things to check when it's not working. For transmitting, the center tap of the transformer primary is held at Vdd and one side or the other is pulled low for each polarity. You have power thru the inductor hooked to the receive side and no power on the transmit side. That's obviously not going to work.

Also, the CS line is active low, not active high as you have shown it.