Functional Description
926
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Ethernet Controller
15.3.9.3 Receive Checksum Offload Engine
Both IPv4 and IPv6 frames in the received Ethernet frames are detected and processed for data integrity.
The receive checksum feature can be enabled by setting the IPC bit of the Ethernet MAC Configuration
(EMACCFG) register. The EMAC receiver identifies IPv4 or IPv6 frames by checking for value 0x0800 or
0x86DD, respectively, in the received Ethernet frames' Type field. This identification also applies to single
VLAN-tagged frames. The offline receive checksum engine calculates IPv4 header checksums and checks
that they match the received IPv4 header checksums. The IP Header Error bit is set for any mismatch
between the indicated payload type (Ethernet Type field) and the IP header version, or when the received
frame does not have enough bytes, as indicated by the Length field of the IPv4 header or when fewer than
20 bytes are available in an IPv4 or IPv6 header. This engine also identifies a TCP, UDP, or ICMP
payload in the received IP datagrams (IPv4 or IPv6) and calculates the checksum of such payloads
properly, as defined in the TCP, UDP, or ICMP specifications. This engine includes the TCP, UDP, or
ICMPv6 pseudo-header bytes for checksum calculation and checks whether the received checksum field
matches the calculated value. The result of this operation is given as a Payload Checksum Error bit in the
receive status word. This status bit is also set if the length of the TCP, UDP, or ICMP payload does not
match the expected payload length given in the IP header.
15.3.10 MAC Management Counters
The MAC Management Counters (MMC) module maintains a set of registers for gathering statistics on the
received and transmitted frames. The register set includes a control register for controlling the behavior of
the registers, two 32-bit registers containing interrupts generated (one for receive and one for transmit),
and two 32-bit registers containing masks for the Interrupt register (one for receive and one for transmit).
The MMC counters are free running and start counting when a corresponding frame is received or
transmitted. The MMC counter registers provided are as follows:
•
Ethernet MAC Transmit Frame Count for Good and Bad Frames (EMACTXCNTGB)
•
Ethernet MAC Transmit Frame Count for Frames Transmitted after Single Collision
(EMACTXCNTSCOL)
•
Ethernet MAC Transmit Frame Count for Frames Transmitted after Multiple Collisions
(EMACTXCNTMCOL)
•
Ethernet MAC Transmit Octet Count Good (EMACTXOCTCNTG)
•
Ethernet MAC Receive Frame Count for Good and Bad Frames (EMACRXCNTGB)
•
Ethernet MAC Receive Frame Count for CRC Error Frames (EMACRXCNTCRCERR)
•
Ethernet MAC Receive Frame Count for Alignment Error Frames (EMACRXCNTALGNERR)
•
Ethernet MAC Receive Frame Count for Good Unicast Frames (EMACRXCNTGUNI)
15.3.11 Power Management Module
The power management (PMT) module supports the reception of network remote wake-up frames and
AMD Magic Packet frames. The PMT module does not perform the clock gate function, but generates
interrupts for remote wake-up frames and magic packets that the MAC receives.
When the application enables the power-down mode in the PMT module by setting the PWRDWN bit in
the Ethernet MAC PMT Control and Status Register (EMACPMTCTLSTAT) register, MAC offset 0x02C,
the MAC drops all received frames and does not forward any frame to the TX/RX Controller RxFIFO or the
application. The MAC comes out of the power-down mode only when a magic packet or a remote wake-up
frame is received and the corresponding detection is enabled.
15.3.11.1 Remote Wake-Up
The Remote Wake-Up register bank is made up of eight 32-bit registers. It is loaded by writing the
Ethernet MAC Remote Wake-Up Frame Filter (EMACRWUFF) register eight times. To load values in the
EMACRWUFF register, the entire register must be written. The first write is assigned to register 0 of the
bank, then register 1 and so on. The Ethernet MAC Remote Wake-Up Frame Filter (EMACRWUFF)
register is read the same way. The current pointer value of the bank is updated in the Remote Wake-Up
FIFO Pointer (RWKPTR) field of the Ethernet MAC PMT Control and Status (EMACPMTCTLSTAT)
register.