2007-10-07 01:05 PM
2011-05-17 12:42 AM
Hi All
I would like to ask anyone who already uses the Ethernet interface if he/she can explain the PHY addressing. I am using the IAR STR912-SK which has the STE100P. The device address is latched on reset/power up from the LED ports - according to the data sheet - and I calculated an address 0x17 from the circuit diagram. Since I didn't have much success at my first attempt to communuicate with the PHY I looked at the method used in the ST library code and saw that the PHY address is fixed in the code to 0x00. So I tried 0x00 and indeed it works. But this is confusing because why should the PHY be responding on this address even when the LED pins have been wired to give a different address? According to the data sheet, a 0x00 on the pins would result in a PHY isolation condition. I am getting a LINK LED lighting when a LAN cable is attached and so I don't think that this is the case.. Any ideas?? Regards Mark Butcher2011-05-17 12:42 AM
Did you ever figure this one out?
2011-05-17 12:42 AM
Hi
No real advancements since then - still using address 0. See also:http://mcu.st.com/mcu/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=5113&forum=21
Regards Mark2011-05-17 12:42 AM
Okay. thanks for the update. Thanks also for the link.
2011-05-17 12:42 AM
Who ever came up with the idea of making ouputs (LEDs) as inputs (strapping pins) caused me a lot of grief, but perhaps the problem you are experiencing is as follows:
the PHY comes up as device 17, but it is set to auto link and begins flashing it's LEDs. Then you hit it with a reset and because the LEDs have some capacitance, they override the weak strapping resistors, so the moment the PHY comes back to life, it misreads your strapping pins. This is exactly what happened to me. The strapping pins requested device 0x01, but a flashing LED caused it to move to 0x05 on fast reset. The solution was to change the reset time to be much longer, to allow the weak strapping resistors to actually drain away the residual charge from the pins. One thing you can do is try to read say register #1 from all possible PHY addresses, and see if anything surprising comes up. This is how we discovered address 0x01 changed to 0x05. I think in addition, address 0x00 comes up as a global address, but everything I've heard about it is to avoid using it.2011-05-17 12:42 AM
About 500,000 clock cycles (5 ms).
2011-05-17 12:42 AM
Hey Lakata,
Any idea how many clock cycles you wait after reset? Thanks. -Jeremy