Figure 323. Mdio Timing And Frame Structure - Write Cycle; Figure 324. Mdio Timing And Frame Structure - Read Cycle - ST STM32F40 Series Reference Manual

Hide thumbs Also See for STM32F40 Series:
Table of Contents

Advertisement

Ethernet (ETH): media access control (MAC) with DMA controller
Idle: the MDIO line is driven in high-impedance state. All three-state drivers must be
disabled and the PHY's pull-up resistor keeps the line at logic one.
SMI write operation
When the application sets the MII Write and Busy bits (in
(ETH_MACMIIAR)), the SMI initiates a write operation into the PHY registers by transferring
the PHY address, the register address in PHY, and the write data (in
register
(ETH_MACMIIDR). The application should not change the MII Address register
contents or the MII Data register while the transaction is ongoing. Write operations to the MII
Address register or the MII Data Register during this period are ignored (the Busy bit is
high), and the transaction is completed without any error. After the Write operation has
completed, the SMI indicates this by resetting the Busy bit.
Figure 323

Figure 323. MDIO timing and frame structure - Write cycle

MDC
MDIO
SMI read operation
When the user sets the MII Busy bit in the Ethernet MAC MII address register
(ETH_MACMIIAR) with the MII Write bit at 0, the SMI initiates a read operation in the PHY
registers by transferring the PHY address and the register address in PHY. The application
should not change the MII Address register contents or the MII Data register while the
transaction is ongoing. Write operations to the MII Address register or MII Data Register
during this period are ignored (the Busy bit is high) and the transaction is completed without
any error. After the read operation has completed, the SMI resets the Busy bit and then
updates the MII Data register with the data read from the PHY.
Figure 324

Figure 324. MDIO timing and frame structure - Read cycle

MDC
MDIO
909/1422
shows the frame format for the write operation.
0 1
32 1's
0 1
A4 A3 A2 A1 A0 R4 R3
Start
OP
Preamble
of
code
frame
shows the frame format for the read operation.
32 1's
0 1 1
0
A4 A3 A2 A1 A0 R4 R3
Start
OP
Preamble
of
code
frame
Data to PHY
Doc ID 018909 Rev 4
R2 R1 R0
Register address Turn
PHY address
Data to PHY
R2 R1 R0
Register address Turn
PHY address
Ethernet MAC MII address register
Ethernet MAC MII data
D15 D14
D1 D0
data
around
D15 D14
D1 D0
data
around
Data from PHY
RM0090
ai15626
ai15627

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F40 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f41 seriesStm32f42 seriesStm32f43 seriesRm0090

Table of Contents

Save PDF