![GigaDevice Semiconductor GD32F20 Series User Manual Download Page 793](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801793.webp)
GD32F20x User Manual
793
not reach the configured IGBS bit time in ENET_MAC_CFG register, this transmit frame will
be pended unless the counter reach the gap time. But if the second transmit frame presents
after the gap time counter has reached the configured gap time, this frame will send
immediately. For Half-duplex mode, the gap time counter follows the Truncated Binary
Exponential Backoff algorithm. Briefly speaking, the gap time counter starts after the previous
frame has completed transmitting on interface or the MAC entered idle state, and there are
three conditions may occur during the gap time:
1) The carrier sense signal active in the first 2/3 gap period. In this case, the counter will
reload and restart.
2) The carrier sense signal active in the last 1/3 gap period. In this case, the counter will
not reload but continue counting, and when reaches gap time, the MAC sends the
second frame
3) The carrier sense signal not active during the whole gap period. In this case, the
counter stops after reaches the configured gap time and sends frame if the second
frame has pended.
Transmit checksum offload
The MAC supports transmit checksum offload. This feature can calculate checksum and
insert it in the transmit frame, and detect error in the receive frame. This section describes
the operation of the transmit checksum offload.
Note:
This function is enabled only when the TSFD bit in the ENET_DMA_CTL register is set
(TxFIFO is configured to Store-and-Forward mode) and application must ensure the TxFIFO
deep enough to store the whole transmit frame. If the depth of the TxFIFO is less than the
frame length, the MAC only does calculation and insertion for IPv4 header checksum field.
See IETF specifications RFC 791, RFC 793, RFC 768, RFC 792, RFC 2460 and RFC 4443
for IPv4, TCP, UDP, ICMP, IPv6 and ICMPv6 packet header specifications, respectively.
IP header checksum
If the value is 0x0800 in type field of Ethernet frame and the value is 0x4 in the IP datagram’s
version field, checksum offload module marks the frame as IPv4 package and calculated
value replace the checksum field in frame. Because of IPv6 frame header does not contain
checksum field, the module will not change any value of the IPv6’s header field. After IP
header checksum calculation end, the result is stored in IPHE bit (bit 16 in TDES0). The
following shows the conditions under which the IPHE bit can be set:
1) For IPv4 frame type:
A). type field is 0x0800 but version filed in IP header is not 0x4.
B). IPv4 header length field value is greater than total frame byte length
C). the value of IPv4 header length field is less than 0x5 (20 bytes)
2) For IPv6 frame type:
A). type field is 0x86dd but version field in IP header is not 0x6
B). the frame ends before the IPv6 standard header or extension header (as given in the
corresponding header length field in an extension header) has been completely received.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...