Sharp LH79524 User Manual page 169

Table of Contents

Advertisement

Ethernet MAC Controller
Before transmitting frames, the buffer descriptors must be initialized by writing an appro-
priate address to bits [31:0] in the first word of each list entry. The second transmit buffer
descriptor is initialized with control information that indicates the length of the buffer,
whether or not it is to be transmitted with a CRC, and whether the buffer is the last buffer
of the frame.
After transmission, the control bits are written back to the second word of the first buffer
along with the Used bit and other status information. The Used bit is written as 1 when a
frame has been transmitted. Bits 27, 28, and 29 indicate various transmit error conditions.
Bit 30 is the Wrap bit which can be set for any buffer within a frame. If no Wrap bit is
encountered, after 1,024 descriptors the queue pointers roll over to the start.
The TXBQP register must not be written while transmit is active. If a new value is written,
the queue pointer resets itself to point to the beginning of the new queue. If transmit is dis-
abled by writing to NETCTL:TXEN, the TXBQP register resets to point to the beginning of
the transmit queue. Note that disabling receive does not have the same effect on the
receive queue pointer.
Once the transmit queue is initialized, transmit is activated by writing to the
NETCTL:STARTTX bit. Transmit is halted when a buffer descriptor with its Used bit set is
read, if a transmit error occurs, or by writing to the NETCTL:TXHALT bit. Transmission is
suspended if a pause frame is received while the NETCONFIG:PAUSEEN bit is 1. Rewrit-
ing the start bit while transmission is active is allowed. This is implemented with the
TXSTATUS:TXGO bit.
The TXGO bit is reset when:
• Transmit is disabled
• A buffer descriptor with its Used bit set is read
• A new value is written to the TXBQ register
• NETCTL:TXHALT is written
• There is a transmit error.
To set TXGO write NETCTL:STARTTX. Transmit halt does not take effect until any ongo-
ing transmit finishes.
If a collision occurs during transmission of a multi-buffer frame, transmission will automat-
ically restart from the first buffer of the frame. If a Used bit is read midway through trans-
mission of a multi-buffer frame, it is treated as a transmit error. Transmission stops,
ETHERTXER is asserted and the FCS will be bad.
If transmission stops due to a transmit error or a Used bit being read, transmission will
restart from the first buffer descriptor of the frame being transmitted when the transmit start
bit is rewritten
6-8
.
Version 1.0
LH79524/LH79525 User's Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lh79525

Table of Contents