SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
Start a new frame.
Figure 7-74 shows the R30 transmit interface. The lower 16 bits of the R30 (or FIFO transmit word) contain transmit data nibbles. When MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 0h - default value (where n = 0 or 1), then the upper 16 bits contain mask information. Alternatively, when MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 1h (where n = 0 or 1), then the upper 16 bits contain transmit data nibbles. The operation to be performed on the transmit interface is controlled by PRU writes to the R31 command interface. Table 7-81 describes the supported configurations for 8, 16, and 32 bit TX push operations.
R31[25] TX_PUSH16/32 | R31[24] TX_PUSH8/32 | Supported R30 bits | TX_32_MODE_EN | TX_BYTE_SWAP | TX Push Action |
---|---|---|---|---|---|
0 | 1 | X | 0 | X | 8 bits of TXDATA (R30[7-0]) pushed post TX mask |
1 | 0 | X | 0 | X | 16 bits of TXDATA (R30[15-0]) pushed post TX mask |
1 | 1 | X | 0 | X | Illegal |
X | X | 0x000000FF | 1 | 0 | 8 bits of TXDATA (R30[7-0]) pushed |
X | X | 0x0000FFFF | 1 | 0 | 16 bits of TXDATA (R30[15-0]) pushed |
X | X | 0xFFFFFFFF | 1 | X | 32 bits of TXDATA (R30[31-0]) pushed |
X | X | All other - reserved | 1 | X | Reserved |
Using MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 0h and the TX mask, the PRU can send a mix of R30 and RX L1 FIFO data to the TX L1 FIFO. Note the TX mask is only available when the PRU is fed one word or byte at a time by the RX L1 FIFO. It is not applicable when the RX L2 buffer is enabled. To disable TX mask, set TXMASK to 0xFFFF.
As shown in Figure 7-75, the PRU drives the MII transmit interface through its R30 register. The contents of R30 and RX data from the receive interface (RX L1 FIFO) are taken and fed into a 40-Bytes transmit FIFO (TX L1 FIFO).
If MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 0h (where n = 0 or 1), then before transmission, a mask is applied to the data portion of the R30 register. By using the mask, the PRU firmware can control whether received data from the RX L1 FIFO is sent to transmit, R30 data is sent to transmit, or a mix of the two is sent. The Boolean equation that is used by MII_RT to compose TX data is:
TXDATA[7/15-0] = (R30[7/15-0] & MASK[7/15-0]) | (RXDATA[7/15-0] & ~MASK [7/15-0])
As shown in the equation, a mask of FFh will lead to the R30[7:0] being transmitted in an 8-bit transmit operation. A mask of 0h will lead to receive data being sent out in a 16-bit transmit operation.