SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
The PRU core is little endian. To support big endian, the MII_G_RT supports optional nibble swapping on both the RX and TX side.
On the receive side, the order of the two data bytes in RX R31 and the RX L2 buffer are configurable through the RX_BYTE_SWAP0/1 bit in the MII_RT_RXCFG0/1 registers, as shown in Table 6-487. Note: The Nibble0 is the first nibble received.
Configuration | Order |
---|---|
MII_RT_RXCFG0/1[5] RX_BYTE_SWAPn = 0h (default), where n = 0 or 1 | R31[15-8] / RXL2[15-8] = Byte1{Nibble3,Nibble2} R31[7-0] / RXL2[7-0] = Byte0{Nibble1,Nibble0} |
MII_RT_RXCFG0/1[5] RX_BYTE_SWAPn = 1h, where n = 0 or 1 | R31[15-8] / RXL2[15-8] = Byte0{Nibble1,Nibble0} R31[7-0] / RXL2[7-0] = Byte1{Nibble3,Nibble2} |
On the transmit side, the order of the two data bytes and mask bytes in TX R30 are configurable through the TX_BYTE_SWAP0/1 bit in the MII_RT_TXCFG0/1 registers, as shown in Table 6-488. Note the Nibble0 is the first nibble transmitted.
Configuration | Order |
---|---|
MII_RT_TXCFG0/1[3] TX_BYTE_SWAPn = 0h (default), where n = 0 or 1 | If MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 0h, where n = 0 or 1 R30[15-8] = Byte1{Nibble3,Nibble2} R30[7-0] = Byte0{Nibble1,Nibble0} R30[31-24] = TX_MASK[15-8] R30[23-16] = TX_MASK[7-0] If MII_RT_TXCFG0/1[11] TX_32_MODE_ENn = 1h, R30[31-24] = Byte3{Nibble7,Nibble6} R30[23-16] = Byte2{Nibble5,Nibble4} R30[15-8] = Byte1{Nibble3,Nibble2} R30[ 7-0] = Byte0{Nibble1,Nibble0} |
MII_RT_TXCFG0/1[3] TX_BYTE_SWAPn = 1h, where n = 0 or 1 | If MII_RT_TXCFG0/1[11] TX_32_MODE_EN = 0h, R30[15-8] = Byte0{Nibble1,Nibble0} R30[7-0] = Byte1{Nibble3,Nibble2} R30[31-24] = TX_MASK[7-0] R30[23-16] = TX_MASK[15-8] If MII_RT_TXCFG0/1[11] TX_32_MODE_EN = 1h, Only 32-bit push is supported. R30[31-24] = Byte0{Nibble1,Nibble0} R30[23-16] = Byte1{Nibble3,Nibble2} R30[15-8] = Byte2{Nibble5,Nibble4} R30[ 7-0] = Byte3{Nibble7,Nibble6} |