GD32F10x User Manual
688
Arbitration for TxDMA and RxDMA controller
There are two types of arbitration method designed for improving the efficiency of DMA
controller between transmission and reception: fixed-priority and round-robin. When DAB bit
in ENET_DMA_BCTL register is reset, arbiter selects round-robin method. The arbiter
allocates the data bus in the ratio set by the RTPR bits in ENET_DMA_BCTL, when both of
TxDMA and RxDMA controller request access simultaneously. When DAB bit in
ENET_DMA_BCTL register is set, arbiter selects fixed-priority, and the RxDMA controller
always has higher priority over the TxDMA.
Error response to DMA controller
During the operation of the DMA controller, when a response error presents on the bus, the
DMA controller considers a fatal error occurs and stops operating at once with error flags
written to the DMA status register (ENET_DMA_STAT). After such fatal error (response error)
occurs, application must reset the Ethernet module and reinitialize the DMA controller.
DMA controller initialization for transmission and reception
Before using the DMA controller, the initialization must be done as follow steps:
1)
Set the bus access parameters by writing the ENET_DMA_BCTL register.
2)
Mask unnecessary interrupt source by configuring the ENET_DMA_INTEN register.
3)
Program the Tx and Rx descriptor table start address by writing the
ENET_DMA_TDTADDR register and the ENET_DMA_RDTADDR register.
4)
Configure filter option by writing related registers.
5)
According to the auto-negotiation result with external PHY, set the SPD bit and DPM bit
for selecting the communication mode (Half-duplex/Full-duplex) and the communication
speed (10Mbit/s or 100Mbit/s). Set the TEN and REN bit in ENET_MAC_CFG register
to enable MAC transmit and receive operations.
6)
Set STE bit and SRE bit in ENET_DMA_CTL register to enable TxDMA controller and
RxDMA controller.
Note:
If the HCLK frequency is too much low, application can enable RxDMA before set REN
bit in ENET_MAC_CFG register to avoid RxFIFO overflow at start time.
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
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...