SPRUHZ7K August 2015 – April 2024 AM5706 , AM5708 , AM5716 , AM5718 , AM5718-HIREL
The PRU can be used to feed data into the TX L1 FIFO using the R30 and R31 registers, shown in Figure 30-61. The PRU has the option two write up to two or four bytes of R30 and then pushes the data into the TX L1 FIFO by writing to the R31 command interface.
Figure 30-62 shows the R30 transmit interface. The lower 16 bits of the R30 (or FIFO transmit word) contain transmit data nibbles. When PRUSS_MII_RT_TXCFG0/1 [TX_32_MODE_EN] = 0, then the upper 16 bits contain mask information. Alternatively, when PRUSS_MII_RT_TXCFG0/1 [TX_32_MODE_EN] = 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 30-278 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 PRUSS_MII_RT_TXCFG0/1 [TX_32_MODE_EN] = 0 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 30-63, the PRU drives the MII transmit interface through its R30 register. The contents of R30 and RX data from the receive interface are taken and fed into a 96 byte transmit FIFO.
If PRUSS_MII_RT_TXCFG0/1 [TX_32_MODE_EN] = 0, 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])