GD32F20x User Manual
812
TxDMA configuration
Operate on second frame in buffer
When OSF bit in ENET_DMA_CTL is reset, the order of the transmitting is follows: the first is
reading transmit descriptor, followed by reading data from memory and writing to FIFO, then
sending frame data on interface through MAC and last wait frame data transmitting complete
and writing back transmitting status.
Above procedure is TxDMA’s standard transmitting procedure but when HCLK is much faster
than TX_CLK, the efficiency of transmitting two frames will be greatly reduced.
To avoid the case mentioned above, application can set OSF to 1.If so, the second frame
data can be read from the memory and push
into FIFO without waiting the first frame’s status
writing back. OSF function is only performed between two neighboring frames.
TxDMA operation mode (A) (default mode): Non-OSF
The TxDMA controller in Non-OSF mode proceeds as follows:
1.
Initialize the frame data into the buffer space and configure the descriptor (TDES0-3)
with DAV bit of TDES0 sets to 1
2.
Enable TxDMA controller by setting STE bit in ENET_DMA_CTL register
3.
The TxDMA controller starts continue polling and performing transmit descriptor. When
the DAV bit in TDES0[31] that TxDMA controller read is cleared, or any error condition
occurs, the controller will enter suspend state and at the same time both the transmit
buffer unavailable bit in ENET_DMA_STAT and normal interrupt summary bit in
ENET_DMA_STAT register are set. If entered into suspend state, operation proceeds
to Step 8
4.
When the DAV bit in TDES0[31] of the acquired descriptor is set, the DMA decodes the
transmit frame configured and the data buffer address from the acquired descriptor
5.
DMA retrieve data from the memory and push it into the TxFIFO of MAC
6.
The TxDMA controller continues polling the descriptor table until the EOF data (LSG bit
is set) is transferred. If the LSG bit of current descriptor is reset, it will be closed by
resetting the DAV bit after all buffer data pushed into TxFIFO. Then the TxDMA
controller waits to write back descriptor status and IEEE 1588 timestamp value if
enabled
7.
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
8.
In the 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 turns to Step 3.
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 ...