DocID018909 Rev 11
RM0090
Ethernet (ETH): media access control (MAC) with DMA controller
1232
indicates the last buffer of the frame. After the last buffer of the frame has been transmitted,
the DMA writes back the final status information to the transmit descriptor 0 (TDES0) word
of the descriptor that has the last segment set in transmit descriptor 0 (TDES0[29]). At this
time, if Interrupt on Completion (TDES0[30]) is set, Transmit Interrupt (in ETH_DMASR
register [0]) is set, the next descriptor is fetched, and the process repeats. Actual frame
transmission begins after the Transmit FIFO has reached either a programmable transmit
threshold (ETH_DMAOMR register[16:14]), or a full frame is contained in the FIFO. There is
also an option for the Store and forward mode (ETH_DMAOMR register[21]). Descriptors
are released (OWN bit TDES0[31] is cleared) when the DMA finishes transferring the frame.
Transmit polling suspended
Transmit polling can be suspended by either of the following conditions:
•
The DMA detects a descriptor owned by the CPU (TDES0[31]=0) and the Transmit
buffer unavailable flag is set (ETH_DMASR register[2]). To resume, the driver must
give descriptor ownership to the DMA and then issue a Poll Demand command.
•
A frame transmission is aborted when a transmit error due to underflow is detected.
The appropriate Transmit Descriptor 0 (TDES0) bit is set. If the second condition
occurs, both the Abnormal Interrupt Summary (in ETH_DMASR register [15]) and
Transmit Underflow bits (in ETH_DMASR register[5]) are set, and the information is
written to Transmit Descriptor 0, causing the suspension. If the DMA goes into
Suspend state due to the first condition, then both the Normal Interrupt Summary
(ETH_DMASR register [16]) and Transmit Buffer Unavailable (ETH_DMASR
register[2]) bits are set. In both cases, the position in the transmit list is retained. The
retained position is that of the descriptor following the last descriptor closed by the
DMA. The driver must explicitly issue a Transmit Poll Demand command after rectifying
the suspension cause.
Normal Tx DMA descriptors
The normal transmit descriptor structure consists of four 32-bit words as shown in
. The bit descriptions of TDES0, TDES1, TDES2 and TDES3 are given below.
Note that enhanced descriptors must be used if time stamping is activated (ETH_PTPTSCR
bit 0, TSE=1) or if IPv4 checksum offload is activated (ETH_MACCR bit 10, IPCO=1).
Figure 379. Normal transmit descriptor
TDE
S
3
O
W
N
Ctrl
[
3
0:26]
Re
s
.
24
Ctrl
[2
3
:20]
Re
s
erved
[19:1
8
]
S
t
a
t
us
[16:0]
Re
s
erved
[
3
1:29]
B
u
ffer 2 byte co
u
nt
[2
8
:16]
Re
s
erved
[15:1
3
]
B
u
ffer 1 byte co
u
nt
[12:0]
B
u
ffer 1
a
ddre
ss
[
3
1:0] / Time
s
t
a
mp low [
3
1:0]
B
u
ffer 2
a
ddre
ss
[
3
1:0] or Next de
s
criptor
a
ddre
ss
[
3
1:0] / Time
s
t
a
mp high [
3
1:0]
TDE
S
0
TDE
S
1
TDE
S
2
3
1
0
a
i15642b
T
T
S
E
T
T
S
S