![ARTERY AT32F435 Series Скачать руководство пользователя страница 589](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592589.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 589
Rev 2.03
greater than 0x600, the MAC sends all received Ethernet frame data to RXFIFO, regardless of the value
on the programmed auto-CRC strip option.
The EMAC watchdog timer is enabled by default, frames above 2048 bytes (DA + SA + LT + Data + pad
+ FCS) are cut off. This feature can be disabled by the WD bit in the EMAC_MACCTRL register. However,
even if the watchdog timer is disabled, frame length greater than 16 KB are cut off and a watchdog
timeout event is reported.
Receive checksum offload
Both IPv4 and IPv6 frames are detected for data integrity by setting the IPC bit in the EMAC_MACCTRL
register. The EMAC identifies IPv4 or IPv6 frames by checking for the Ethernet type field value. The
receive checksum offload calculates IPv4 header checksums and checks that they match the received
IPv4 header checksums. The result of the header checksum is indicated by the bit 7 of the receive
descriptor (RDES0). The IP header error bit is set either one of the following conditions:
1.
Ethernet type field does not match the IP header version field
2.
Received frames are less than the length indicated by the IPv4 header length field
3.
IPv4 or IPv6 headers less than 20 bytes
The receive checksum offload 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. It includes the TCP/UDP/ICMPv6 pseudo-header bytes for checksum calculation
and the result of CRC is indicated by the bit 0 in the receive descriptor (RDES0). This bit is set either
one of the following conditions:
1.
Received TCP, UDP or ICMP data length does not match that of the IP headers
2.
The calculated checksum does not equal the value of the TCP, UDP or ICMP checksum field
Receive flow control
In Full-duplex mode, the MAC detects the receiving Pause frame and pauses the frame transmission
according to the delay specified within the received Pause frame.
The ERF bit in the EMAC_MACFCTRL register to enable or disable Pause frame detection function.
Once receive flow control is enabled, the EMAC will decode the Pause frames.
During the pause period, if another Pause frame is detected with a zero Pause time value, the MAC
clears the PAUSE time and retransmits the data. If it is not a zero Pause time value, the pause time in
the frame will be immediately loaded into the pause time counter.
Receive operation multiframe handling
Since the status is available immediately following the data, the RXFIFO is capable of storing any
number of frames into it, as long as it is not full.
Receive status word
At the end of the Ethernet frame reception, the EMAC will send the receive status to the application
(DMA). The detailed information of the receive status is given in the RDES0.
EMAC loopback mode
The EMAC supports loopback of transmitted frames onto its receiver. The loopback mode is very useful
to debug the Ethernet communication. This feature is enabled by setting the LM bit in the
EMAC_MACCTRL register.
Note that the loopback mode is applicable only to the MII interface.
EMAC frame counter
The MAC management counters (MMC) contain a set of registers for gathering statistics on the received
and transmitted frames. These include the EMAC_MMCCTR, EMAC_MMCRI, EMAC_MMCRIM,
EMAC_MMCTI and EMAC_MMCTIM registers.
If a frame transmission is aborted due to any of the following errors, this frame will not be counted:
1. No carrier/Loss of carrier
2. Jabber timeout
3. Late collision
4. Excessive collision
5. Excessive deferral