Altera_Forum
Honored Contributor
15 years agoTrouble making networking work with National Semiconductor DP83848J PHY
I'm still working on getting networking going on my soft processor. I've made
a lot of progress but currently have exhausted my ideas for troubleshooting. I'm hoping the veterans of the forum might have suggestions. What I have is a cyclone II based board with SDRAM, flash, and SSRAM. The SDRAM is known good, it has passed memory tests and I am not yet attempting to use the flash or SSRAM. I have a DP83848J-MAU-EK (note the J is relevant, not the C that other designs have used) from National Semiconductor (http://www.national.com/pf/dp/dp83848j.html#boards). It is an evaluation board for the DP83848J and it has a single header carrying 3.3V, ground, and the MII signals. I have a cable that brings these MII connections directly to my FPGA with no buffers or pull ups. I also have two different development kits that use a similar chip for their PHY. I have the BeMicro SDK and I have the NIOS Embedded Evaluation Kit (aka NEEK). Both these board have a National Semiconductor DP83848C Phy chip with the MII signals wired directly to the FPGA. The problem is that I simply cannot get the PHY to work on my board. I have run two different operating systems, the "Micrium on Altera Hardware Abstraction Layer" and Linux 2.6.37. I also have two separate soft MAC's I have tried, the Altera Triple Speed Ethernet MAC and the Avalon "Igor Open Cores Mac". I have been able to make all four combinations of MAC and OS work on both my development kits. But not on my hardware. The failure mode is interesting because it passes all the phy initializations and does not indicate any error initializing or attaching the PHY to the MAC. But it simply does not send or receive any traffic. I have monitored the MDIO bus with signatap and I can clearly see the MAC scanning the MDIO bus for a phy at various addresses and then initializing the phy when it finds one at a valid address. I have decoded dozens of MDIO bus transactions and they all look textbook perfect to my (limited) experience. I have connected a computer directly to the network port of the PHY and monitored all bus traffic with Wireshark. If I ping from my computer into the test board, I clearly see exactly what I would expect with RXDV rising and the data lines clocking data. If I ping out from the test board, I see TXEN rise and the data clock out on the TXD lines. I've wired up a test source project and verified that all signals are routed to the correct pins on the Phy board. I've chased down a couple of leads that led no where. At first I was getting the PHY "strapped" in at a wierd address, it was being recognized at address 0x1F. I eventually tracked that down and corrected it but it made no difference. It was responding the same at address 1 as 0x1F. I thought maybe that the fact the Phy Evaluation board did not connect the Phy reset signal might be causing the Phy to come up in an odd state. So we soldered a jumper from an unused pin on the header to the reset pin but it did not change the behavior of the system to reset the phy prior to initialization (other than it did clear up the odd address getting strapped into the Phy). I'm left with two theories: Either the hardware is "defective" in some subtle way or there is something about the "J" revision of the chip that breaks the drivers in both operating systems. The two chips do have separate data sheets: http://www.national.com/ds/dp/dp83848c.pdf http://www.national.com/ds/dp/dp83848j.pdf But according to the migration application note, the differences should not affect the software drivers because all the "core" registers are the same. http://www.national.com/an/an/an-1854.pdf. I have no problem building hardware and software packages from scratch for either the BeMicro or the NEEK and can make networking work on both platforms for all four possible combinations of OS and soft MAC. But on my hardware connected to that evaluation kit board, I get "silent failure" on all four possible combinations. No errors indicated, no warnings, just no traffic sent or received. Sorry for the long winded email, just looking for any suggestions of how you might test or instrument the system for more answers. On Monday I'm ordering a DP83848C evaluation kit if I can find one in stock. Any suggestions welcome and thanks for your time. David