![GigaDevice Semiconductor GD32F20 Series User Manual Download Page 822](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801822.webp)
GD32F20x User Manual
822
frame, if any one of the below cases occurs the MAC can discard the received frame data in
RxFIFO and the RxDMA controller will not forward these data: 1) The received frame bytes
is less than 64. 2) Collision occurred during frame receiving. 3) The premature termination for
the receiving frame.
When the available time comes, the RxDMA controller starts transfer frame data from RxFIFO
to the receive buffer. If the SOF is included in current receive buffer, the FDES bit in RDES0
is set when the RxDMA controller writing receive frame status to indicate this descriptor is
used for storing the first part of the frame. If the EOF is included in current receive buffer, the
LDES bit in RDES0 is set when RxDMA controller writing receive frame status to indicate this
descriptor is used for storing the last part of the frame. Often when the buffer size is larger
than received frame, the FDES and LDES bit are set in the same descriptor. When the EOF
is transferred to buffer or the receive buffer space is exhausted, the RxDMA controller fetches
the next receive descriptor and closes previous descriptor by writing RDES0 with DAV=0. If
the LDES bit is set, the other status are also be updated and the RS bit in ENET_DMA_STAT
register will be set when DINTC=0 or not when DINTC=1. If the DAV bit of the next descriptor
is set, the RxDMA controller repeats above operation when received a new frame. If the DAV
bit of the next descriptor is reset, the RxDMA controller enters suspend state and sets RBU
bit in ENET_DMA_STAT register. The pointer value of descriptor address table is retained
and be used for the starting descriptor address after exiting suspend state.
Processing after a new frame received in suspend state
When a new frame is available (see available definition in the previous paragraph), the
RxDMA controller fetches the descriptor. If the DAV bit in RDES0 is set, the RxDMA controller
exits suspend state and returns to running state for frame reception. But if the DAV bit in
RDES0 is reset, application can choose whether these received frame data in RxFIFO are
flushed or not by configuring DAFRF bit in ENET_DMA_CTL register. If DAFRF=0, the
RxDMA controller discards these received frame data and makes the missed frame counter
(MSFC) increase one. If DAFRF=1, these frame data are will not be flushed and MSFC
counter will not increase until the RxFIFO is full. If the DAV bit is reset in fetched descriptor,
the RBU bit in ENET_DMA_STAT register will be set and the RxDMA controller will be still in
suspend state.
Receive DMA descriptor with IEEE 1588 timestamp format
If the IEEE 1588 function enabled, the MAC writes the timestamp value to RDES2 and RDES3
after a frame with timestamp reception complete and before the RxDMA controller clears the
DAV bit.
RxDMA descriptors
In normal descriptor mode, the descriptor structure consists of four 32-bit words: RDES0 ~
RDES3. The detailed description of RDES0, RDES1, RDES2 and RDES3 are given below.
Figure 27-10. Receive descriptor
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 ...