If this is a higher volume product or you need to be sending network data through the switch then you should contact NetBurner sales about a custom design. If you are just looking just talk to the management interface to prototype a few units then you can hack on some jumper wires to the NetBurner PHY. These pins would be the MDIO ( MII management open-collector data I/O, Pin#1 of 8721 PHY ) and MDC ( MII management clock, Pin#2 of 8721 PHY ). One problem you may have is that the MDC signal is actively driven. If there is another device talking to the management interface of your switch you will need to put a selector to choose between the MDC signals. The MDIO should be OK to tie together since it is open-collector.
You also need to make sure that your other PHY/Switch has a different 4-bit address then the NetBurner PHY. This is usually configurable with hardware pull-up/down on the PHY pins. The Ethernet driver automatically scans all addresses to find the NetBurner PHY address, you can print this out using the "void ShowFECRegisters()" function from etherprint.cpp. Once you connect your device you can do something like the following to confirm that both PHYs are communicating at unique addresses:
Code: Select all
for(int i=0; i< 32; i++)
{
WORD test = GetMII( i, 0x3);
if(test != 0xFFFF && test != 0x0 )
iprintf("We found a PHY_ID = %X at address %X\r\n", test, i);
}
You should then be able to read or write to the PHY management registers of your switch with the following two functions:
DWORD GetMII( BYTE mii_dev, BYTE addr );
DWORD SetMII( BYTE mii_dev, BYTE addr, WORD value );
The mii_dev parameter is your 4-bit address we discovered in the code above.
The addr parameter is the address of the register you are looking to talk to
-Larry
edit: I forgot to mention, you will likely need to modify the NetBurner Ethernet driver so it does not interfere with the MII communication. The Ethernet driver is constantly polling the MII interface of the PHY to confirm there is an active link, and speed/duplex status. You probably only need to modify the ProcessDuplex function in Ethernet.cpp. Comment out any lines that write to the sim.fec.mii_data register, also change any lines that read from sim.fec.mii_data to be a constant. This will make the driver think that it always has a valid link but at least it will function.