
GD32F20x User Manual
813
TxDMA operation mode (B): OSF
The TxDMA controller supports transmitting two frames without waiting status write back of
the first frame, this mode is called operation on second frame (OSF). When the frequency of
system is much faster than the frequency of the MAC interface (10Mbit/s or 100Mbit/s), the
OSF mode can improve the sending efficiency. Setting OSF bit in ENET_DMA_CTL register
can enable this mode. When the TxDMA controller received EOF of the first frame, it will not
enter the state of waiting status write back but to fetch the next descriptor, if the DAV bit and
FSG bit of the next descriptor is set, the TxDMA controller immediately read the second frame
data an push them into the MAC FIFO.
The TxDMA controller in OSF mode proceeds as follows:
1. Follow steps 1-6 operation in TxDMA default mode
2. The TxDMA controller retrieves the next descriptor without closing the
previous frame’s
last descriptor in which the LSG bit is set
3. If the DAV bit of the next descriptor is set, the TxDMA controller starts reading the next
frame’s data from the buffer address. If the DAV bit of the next descriptor is reset,
TxDMA controller enters suspend state and the next operation goes to Step 7.
4. TxDMA controller continues polling descriptor and frame data until the EOF is
transferred. If a frame is described with more than one descriptor, the intermediate
descriptors are all closed by TxDMA controller after fetched.
5. The TxDMA controller enters the state of waiting for the transmission status and time
stamp of the previous frame (if timestamp enabled). With writing back status to
descriptor, the DAV bit is also cleared by TxDMA controller
6. After the whole frame is transferred, the transmit status bit (TS bit in ENET_DMA_STAT
register) is set only when INTC bit in TDES0[30] is set. Also an interrupt generates if the
corresponding interrupt enable flag is set. The TxDMA controller returns to Step 3 for
the next frame if no underflow error occurred in previous frame. If underflow error of the
previous frame is occurred, the TxDMA controller enters in suspend state and the next
operation goes to Step 7.
7. In suspend state, when the status information and timestamp value (if the function is
enable) of the transmitting frame is available, the TxDMA controller writes them back to
descriptor and then close it by setting DAV=0 of descriptor.
8. In suspend state, application can make TxDMA returns to running state by writing any
data to ENET_DMA_TPEN register and clearing the transmit underflow flag. Then the
TxDMA controller process goes to Step 1 or Step 2.
Transmit frame format in buffer
According to IEEE 802.3 specification described before, a frame structure is made up of such
fields: Preamble, SFD, DA, SA, QTAG (option), LT, DATA, PAD (option), and FCS.
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 ...