29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

RM0008<br />

The checksum is calculated for the TCP, UDP, or ICMP payload <strong>and</strong> inserted into its<br />

corresponding field in the header. It can work in the following two modes:<br />

– In the first mode, the TCP, UDP, or ICMPv6 pseudo-header is not included in the<br />

checksum calculation <strong>and</strong> is assumed to be present in the input frame’s checksum<br />

field. The checksum field is included in the checksum calculation, <strong>and</strong> then<br />

replaced by the final calculated checksum.<br />

– In the second mode, the checksum field is ignored, the TCP, UDP, or ICMPv6<br />

pseudo-header data are included into the checksum calculation, <strong>and</strong> the<br />

checksum field is overwritten with the final calculated value.<br />

Note that: for ICMP-over-IPv4 packets, the checksum field in the ICMP packet must<br />

always be 0x0000 in both modes, because pseudo-headers are not defined for such<br />

packets. If it does not equal 0x0000, an incorrect checksum may be inserted into the<br />

packet.<br />

The result of this operation is indicated by the payload checksum error status bit in the<br />

Transmit Status vector (bit 12). The payload checksum error status bit is set when<br />

either of the following is detected:<br />

– the frame has been forwarded to the MAC Transmitter in Store-<strong>and</strong>-forward mode<br />

without the end of frame being written to the FIFO<br />

– the packet ends before the number of bytes indicated by the payload length field in<br />

the IP header is received.<br />

When the packet is longer than the indicated payload length, the bytes are ignored as<br />

stuff bytes, <strong>and</strong> no error is reported. When the first type of error is detected, the TCP,<br />

UDP or ICMP header is not modified. For the second error type, still, the calculated<br />

checksum is inserted into the corresponding header field.<br />

MII/RMII transmit bit order<br />

Each nibble from the MII is transmitted on the RMII a dibit at a time with the order of dibit<br />

transmission shown in Figure 296. Lower order bits (D1 <strong>and</strong> D0) are transmitted first<br />

followed by higher order bits (D2 <strong>and</strong> D3).<br />

Figure 296. Transmission bit order<br />

LSB<br />

RMII_TXD[1:0]<br />

MSB<br />

D0<br />

D1<br />

Bibit stream<br />

LSB<br />

D0<br />

D1<br />

MII_TXD[3:0]<br />

D2<br />

MSB<br />

D3<br />

Nibble stream<br />

ai15632<br />

858/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!