MII Management Interface, turnaround bits

Hi

I'm implementing software GPIO based SMI protocol for a small embedded microcontroller, and got stuck with turnaround bits. As I understand it, after reading 802.3 spec, it consists of two bits, and only the first bit depends on operation - read or write. For write it's always '1', but I can't understand how it is asserted for reading.

And seconf half of my question: I use two gpio pins, one for MDC and the other for MDIO. To set turnaround bits, do I have to drive only MDIO? As far as I understand the standard, MDC is not affected, isn't it ?

Thanks.

--
Mark
Reply to
Mark
Loading thread data ...

can't

far

for reading as soon as you have sent the register address bits, you set the MDIO pin to high impedance i.e. z .

yes, MDC is not affected by whatever you do with MDIO since MDC is only a clock signal. MDIO runs in sync with MDC .

--------------------------------------- Posted through

formatting link

Reply to
salimbaba

I found a reference code implementing software MII managament for LPC1700, the way they implement turnaround functions is like this:

static void turnaround_MDIO(void) { GPIO2->FIODIR &= ~MDIO; GPIO2->FIOSET = MDC; delay(); GPIO2->FIOCLR = MDC; delay(); }

Why do they toggle direction of MDIO line?

--
Mark
Reply to
Mark

As salimbaba said: to turn the Hi-Z on and off.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
(remove the obvious prefix to reply by mail)
Reply to
Boudewijn Dijkstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.