LAN9118 Family Programmer Reference Guide
Revision 1.0 (12-14-09) 40 SMSC AN 12.12
APPLICATION NOTE
RX_DATA_FIFO must be read an appropriate number of DWORDS to purge the miniscule packet.
This should only happen if the MAC_CR is configured to PASSBAD packets ( == ‘1’).
7.3 Flow Control FunctionThe flow control function monitors space available in the RX Data FIFO. When the threshold set by
the in AFC_CFG:AFC_HI field is reached, the Flow Controller will instruct the MAC to send a pause
frame (in full-duplex mode), or to jam incoming frames (in half-duplex mode). Logic residing in the
MAC is then responsible for inserting the PAUSE frame or generating backpressure at the appropriate
time.
7.3.1 Backpressure
When operating in half-duplex mode with the transmitter and flow control enabled, the controller will
automatically assert backpressure based on the setting of AFC_CFG register. When the RX Data FIFO
reaches the level set by AFC_HI the Backpressure Duration Timer will start. The controller will assert
backpressure for any received frames as defined by the FCANY, FCADD, FCMULT and FCBRD
control bits. This continues until the Backpressure Duration Timer reaches the time specified by the
BACK_DUR field. After the BACK_DUR time period has elapsed the receiver will accept one frame.
If, after receiving one RX frame, the RX Data FIFO is still above the threshold set by AFC_LO, the
controller will again start the Backpressure duration timer and will assert backpressure for subsequent
frames repeating the process described here until the RX Data FIFO level drops below the AFC_LO
setting. If the RX Data FIFO drops below AFC_LO before the Backpressure Duration Timer has
expired, the timer will immediately reset and backpressure will not be asserted until the RX Data FIFO
level exceeds AFC_HI.
If the AFC_LO value is set to all ones (0xff) and the AFC_HI value is set to all zeros (0x00), the flow
controller will assert backpressure for received frames as if AFC_HI threshold is always exceeded. The
driver can use this mechanism to direct flow control by enabling and disabling the FCANY, FCADD,
FCMULT and FCBRD bits.The BACK_DUR field can be used to avoid excessive collisions, and the
FCANY bit can be used to eliminate late collisions, unless the LAN topography is known before hand.
7.3.2 Pause Frames
When operating in full-duplex mode with the transmitter and flow control enabled, the controller will
automatically transmit pause frames based on the settings of AFC_CFG and FLOW registers. When
the RX Data FIFO reaches the level set by AFC_HI the controller will transmit a pause frame. The
pause time field that is transmitted is set in the Pause Time (FCPT) field of the FLOW register. When
the RX Data FIFO drops below AFC_LO the controller will automatically transmit a pause frame with
a pause time of zero. The controller will only send another pause frame when the RX Data FIFO level
falls below AFC_LO and then exceeds AFC_HI again.