10 Ethernet Media Access Controller (MAC)
10.2.1.1 Transmit Flow Control
In full-duplex mode, when the Transmit Flow Control Enable bit (TFE bit in the Flow Control Register) is set to 1,
the MAC will generate and send a pause frame, as needed. The pause frame is added and transmitted together
with the calculated CRC. The generation of pause frames can be initiated in two ways.
When the application sets the Flow Control Busy bit (FCB bit in the Flow Control Register) to 1, or when the Rx
FIFO is full, a pause frame is transmitted.
• If an application has requested flow control by setting the FCB bit in the Flow Control Register to 1, the MAC
will generate and send a single pause frame. The pause time value in the generated frame is the pause
time value programmed in the Flow Control Register. To extend or end the pause time before the time
specified in the previously transmitted pause frame, the application program must configure the pause
time value in the Flow Control Register to the appropriate value and, then, request another pause frame
transmission.
• If the application has requested flow control when the Rx FIFO is full, the MAC will generate and transmit a
pause frame. The value of the pause time of the generated frame is the pause time value programmed in
the Flow Control Register. If the Rx FIFO remains full during the configurable interval, which is determined
by the Pause Low Threshold bit (PLT) in the Flow Control Register before the pause time expires, a second
pause frame will be transmitted. As long as the Rx FIFO remains full, the process repeats itself. If the FIFO
is no longer full before the sample time, the MAC will send a pause frame with zero pause time, indicating
to the remote end that the Rx buffer is ready to receive the new data frame.
10.2.1.2 Retransmission During a Collision
In half-duplex mode, a collision may occur on the MAC line interface when frames are transmitted to the MAC.
The MAC may even give a status to indicate a retry before the end of the frame is received. The retransmission
is then enabled and the frame is popped out from the FIFO. When more than 96 bytes are transmitted to the
MAC core, the FIFO controller frees the space in the FIFO, allowing the DMA to push more data into FIFO. This
means that data cannot be retransmitted after the threshold is exceeded or when the MAC core indicates that
a late collision has occurred.
The MAC transmitter may abort the transmission of a frame because of collision, Tx FIFO underflow, loss of
carrier, jabber timeout, no carrier, excessive deferral, and late collision. When frame transmission is aborted
because of collision, the MAC requests retransmission of the frame.
10.2.2 Receive Operation
A receive operation is initiated when the MAC detects an SFD on the RMII or MII. The MAC strips the Preamble
and SFD before processing the frame. The header fields are checked for the filtering and the FCS (Frame Check
Sequence) field used to verify the CRC for the frame. The received frame is stored in a shallow buffer until the
address filtering is performed. The frame is dropped in the MAC if it fails the address filtering.
The frame received by the MAC will be pushed into the Rx FIFO. Once the FIFO status exceeds the Receive
Threshold, configured by the Receive Threshold Control (RTC) bit in the Operation Mode register, the DMA can
initiate a preconfigured burst transmission to the AHB interface.
In the default pass-through mode, when the FIFO receives a complete packet or 64 bytes configured by the
RTC bit in the Operation Mode Register, the data pops up and its availability is notified to the DMA. After the DMA
initiates the transmission to the AHB interface, the data transmission continues from the FIFO until the complete
Espressif Systems
229
Submit Documentation Feedback
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?