5.2 MAC Frame Data Transactions
All Ethernet MAC frame data transactions consist of a series of blocks. Ethernet MAC frames are transferred over SPI between the MAC-PHY and host by breaking the frames into segments. Each block consists of one or more segments of an Ethernet frame within a data payload plus a 32-bit header/footer. See Figure 5-2. Each SPI transaction will consist of an equal number of transmit and receive data blocks. Not all data within each data block payload is required to all be valid. A transmit data block will be preceded with a 32-bit header indicating which bytes of the following data payload contains valid Ethernet transmit frame data. A receive data block is concluded with a 32-bit footer indicating which bytes of the following data payload contains valid Ethernet receive frame data.
By default, the block payload data is 64 bytes in size. A smaller block payload data size of 32 bytes is also supported and may be configured in the Block Payload Size (BPS) field of the Configuration 0 (OA_CONFIG0) register. When changing the block payload size, the Buffer Size (BUFSZ) field of the Queue Transmit Configuration (QTXCFG) and Queue Receive Configuration (QRXCFG) registers must also be changed. Changing the block payload size must be performed prior to setting the Configuration Synchronization (SYNC) bit in the OA_CONFIG0 register enabling Ethernet frame transfer.
Typically, transmit Ethernet frames are received by the MAC-PHY from the host without any padding or frame check sequence (FCS). The integrated MAC appends any padding and calculated FCS to the frame before transmitting the packet over the network.
When receiving, the MAC-PHY receives the packets from the network and the integrated MAC validates the received frames with the received FCS. When the MAC validates that a frame was received correctly, it will relay the frame to the host over SPI. If the Remove FCS (RFCS) bit of the MAC Network Configuration Register (MAC_NCFGR) is set, the MAC will strip the FCS from the frames prior to forwarding them to the host. Should the received FCS for a frame fail to validate, the MAC will increment the Frame Check Sequence Error (FCSE) counter in the MAC Statistics 2 (STATS2) register and the frame will be dropped.