stm32 /stm32h5 /STM32H573 /ETH /ETH_MACMDIOAR

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as ETH_MACMDIOAR

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (MB)MB 0 (C45E)C45E 0 (B_0x0)GOC0 (SKAP)SKAP 0 (B_0x0)CR0NTC0RDA0PA0 (BTB)BTB 0 (PSE)PSE

GOC=B_0x0, CR=B_0x0

Description

MDIO address register

Fields

MB

MII Busy The application sets this bit to instruct the SMA to initiate a Read or Write access to the MDIOS. The MAC clears this bit after the MDIO frame transfer is completed. Hence the software must not write or change any of the fields in MDIO address register (ETH_MACMDIOAR) and MDIO data register (ETH_MACMDIODR) as long as this bit is set. For write transfers, the application must first write 16-bit data in the MD field (and also RA field when C45E is set) in MDIO data register (ETH_MACMDIODR) register before setting this bit. When C45E is set, it should also write into the RA field of MDIO data register (ETH_MACMDIODR) before initiating a read transfer. When a read transfer is completed (MII busy=0), the data read from the PHY register is valid in the MD field of the MDIO data register (ETH_MACMDIODR). Note: Even if the addressed PHY is not present, there is no change in the functionality of this bit.

C45E

Clause 45 PHY Enable When this bit is set, Clause 45 capable PHY is connected to MDIO. When this bit is reset, Clause 22 capable PHY is connected to MDIO.

GOC

MII Operation Command This bit indicates the operation command to the PHY. When Clause 22 PHY is enabled, only Write and Read commands are valid.

0 (B_0x0): Reserved, must not be used

1 (B_0x1): Write

2 (B_0x2): Post Read Increment Address for Clause 45 PHY

3 (B_0x3): Read

SKAP

Skip Address Packet When this bit is set, the SMA does not send the address packets before read, write, or post-read increment address packets. This bit is valid only when C45E is set.

CR

CSR Clock Range The CSR Clock Range selection determines the frequency of the MDC clock according to the CSR clock frequency used in your design: 0110 to 0111: Reserved, must not be used The suggested range of CSR clock frequency applicable for each value (when Bit 11 = 0) ensures that the MDC clock is approximately between 1.0 MHz to 2.5 MHz frequency range. When Bit 11 is set, you can achieve a higher frequency of the MDC clock than the frequency limit of 2.5 MHz (specified in the IEEE 802.3) and program a clock divider of lower value. For example, when CSR clock is of 100 MHz frequency and you program these bits to 1010, the resultant MDC clock is of 12.5 MHz which is above the range specified in IEEE 802.3. Program the following values only if the interfacing chips support faster MDC clocks:

0 (B_0x0): CSR clock = 60-100 MHz; MDC clock = CSR clock/42

1 (B_0x1): CSR clock = 100-150 MHz; MDC clock = CSR clock/62

2 (B_0x2): CSR clock = 20-35 MHz; MDC clock = CSR clock/16

3 (B_0x3): CSR clock = 35-60 MHz; MDC clock = CSR clock/26

4 (B_0x4): CSR clock = 150-250 MHz; MDC clock = CSR clock/102

5 (B_0x5): CSR clock = 250-300 MHz; MDC clock = CSR clock/124

8 (B_0x8): CSR clock/4

9 (B_0x9): CSR clock/6

10 (B_0xA): CSR clock/8

11 (B_0xB): CSR clock/10

12 (B_0xC): CSR clock/12

13 (B_0xD): CSR clock/14

14 (B_0xE): CSR clock/16

15 (B_0xF): CSR clock/18

NTC

Number of Training Clocks This field controls the number of trailing clock cycles generated on ETH_MDC after the end of transmission of MDIO frame. The valid values can be from 0 to 7. Programming the value to 011 indicates that there are additional three clock cycles on the MDC line after the end of MDIO frame transfer.

RDA

Register/Device Address These bits select the PHY register in selected Clause 22 PHY device. These bits select the Device (MMD) in selected Clause 45 capable PHY.

PA

Physical Layer Address This field indicates which Clause 22 PHY devices (out of 32 devices) the MAC is accessing. This field indicates which Clause 45 capable PHYs (out of 32 PHYs) the MAC is accessing.

BTB

Back to Back transactions When this bit is set and the NTC has value greater than 0, then the MAC informs the completion of a read or write command at the end of frame transfer (before the trailing clocks are transmitted). The software can thus initiate the next command which is executed immediately irrespective of the number trailing clocks generated for the previous frame. When this bit is reset, then the read/write command completion (MII busy is cleared) only after the trailing clocks are generated. In this mode, it is ensured that the NTC is always generated after each frame. This bit must not be set when NTC=0.

PSE

Preamble Suppression Enable When this bit is set, the SMA suppresses the 32-bit preamble and transmit MDIO frames with only 1 preamble bit. When this bit is 0, the MDIO frame always has 32 bits of preamble as defined in the IEEE specifications.

Links

()