MII Management Interface, turnaround bits

Mar 29, 2010 3 Replies

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

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

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

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)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required