ADSP-BF537 Blackfin Processor Hardware Reference
8-131
Ethernet MAC
SET_REGAD(RegAddr) |\
STAOP | STABUSY;
}
The data in the
STADAT
register is immediately shifted out after a write to
the
STAADD
register. See
.
The function in
shows how PHY data is read over the MIM
function block of the MAC. First, the
STABUSY
bit of the
EMAC_STAADD
will
be polled until no other function is using the MIM block. The PHY
address and register address is sent over the MIM block. Then, the
STABUSY
bit is polled again, before the data is finally read through the
EMAC_STADAT
register.
Listing 8-9. Read Access to the PHY
//
/* Read an off-chip register in a PHY through the MDC/MDIO port
*/
//
u16 RdPHYReg(u16 PHYAddr, u16 RegAddr)
{
u16 Data;
PollMdcDone();
*pEMAC_STAADD = SET_PHYAD(PHYAddr) |\
SET_REGAD(RegAddr) |\
STABUSY;
PollMdcDone();
Data = (u16)*pEMAC_STADAT;
return Data;
}
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...