29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Ethernet (ETH): media access control (MAC) with DMA controller<br />

RM0008<br />

The application can select one of the 32 PHYs <strong>and</strong> one of the 32 registers within any PHY<br />

<strong>and</strong> send control data or receive status information. Only one register in one PHY can be<br />

addressed at any given time.<br />

Both the MDC clock line <strong>and</strong> the MDIO data line are implemented as alternate function I/O<br />

in the microcontroller:<br />

● MDC: a periodic clock that provides the timing reference for the data transfer at the<br />

maximum frequency of 2.5 MHz. The minimum high <strong>and</strong> low times for MDC must be<br />

160 ns each, <strong>and</strong> the minimum period for MDC must be 400 ns. In idle state the SMI<br />

management interface drives the MDC clock signal low.<br />

● MDIO: data input/output bitstream to transfer status information to/from the PHY device<br />

synchronously with the MDC clock signal<br />

Figure 285. SMI interface signals<br />

STM32<br />

802.3 MAC<br />

MDC<br />

MDIO<br />

External<br />

PHY<br />

ai15621<br />

SMI frame format<br />

The frame structure related to a read or write operation is shown in Table 13, the order of bit<br />

transmission must be from left to right.<br />

Table 189.<br />

Management frame format<br />

Management frame fields<br />

Preamble<br />

(32 bits)<br />

Start Operation PADDR RADDR TA Data (16 bits) Idle<br />

Read 1... 1 01 10 ppppp rrrrr Z0 ddddddddddddddd Z<br />

Write 1... 1 01 01 ppppp rrrrr 10 ddddddddddddddd Z<br />

The management frame consists of eight fields:<br />

● Preamble: each transaction (read or write) can be initiated with the preamble field that<br />

corresponds to 32 contiguous logic one bits on the MDIO line with 32 corresponding<br />

cycles on MDC. This field is used to establish synchronization with the PHY device.<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Start: the start of frame is defined by a pattern to verify transitions on the line<br />

from the default logic one state to zero <strong>and</strong> back to one.<br />

Operation: defines the type of transaction (read or write) in progress.<br />

PADDR: the PHY address is 5 bits, allowing 32 unique PHY addresses. The MSB bit of<br />

the address is the first transmitted <strong>and</strong> received.<br />

RADDR: the register address is 5 bits, allowing 32 individual registers to be addressed<br />

within the selected PHY device. The MSB bit of the address is the first transmitted <strong>and</strong><br />

received.<br />

TA: the turn-around field defines a 2-bit pattern between the RADDR <strong>and</strong> DATA fields to<br />

avoid contention during a read transaction. For a read transaction the MAC controller<br />

842/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!