Other Parts Discussed in Thread: AM3359
Hi,
a customer needs to implement a custom variant of the PRU EMAC with some special features. As an initial test, the customer is trying to use the auto-forward configuration of the MII RX to MII TX inside the PRU. The TRM describes that in chapter 4.4.6.2.1.1 Auto-forward with optional PRU snoop.
After setting up the external PHY DP83822 with the MDIO interface, the customer can connect an ethernet cable and the link comes up.
Then the sequence is to configure various registers in the MII to get it into the auto-forward, these steps are:
- PRU SYSCFG - Set IDLE_MODE 1
- PRU SYSCFG - Set STANDBY_INIT 1
- PRU SYSCFG - Set STANDBY_MODE 1
- PRU GPCFG0 – Set GPI Mode 3 (MII_RT)
- PRU GPCFG1 – Set GPI Mode 3 (MII_RT)
- PRU IEPCLK - Set OCP_EN 1 to select ocp_clk
- PRU TX IPG0 – Write 0xb8
- PRU TX IPG1 – Write 0xb8
- PRU RXCFG0 – Set RX_ENABLE 1, RX_CUT_PREMABLE 0, RX_MUX_SEL 0, RX_L2_ENABLE 1, RX_BYTE_SWAP 0, RX_AUTO_FWD_PRE 1
- PRU_TXCFG0 – Set TX_ENABLE 1, TX_AUTO_PREAMBLE 0, TX_EN_MODE 0, TX_BYTE_SWAP 0, TX_MUX_SEL 0, TX_AUTO_SEQUENCE 1, TX_START_DELAY 0x40, TX_CLOCK_DELAY 0x6
- PRU RXCFG1 – Set RX_ENABLE 1, RX_CUT_PREMABLE 0, RX_MUX_SEL 1, RX_L2_ENABLE 1, RX_BYTE_SWAP 0, RX_AUTO_FWD_PRE 1
- PRU_TXCFG1 – Set TX_ENABLE 1, TX_AUTO_PREAMBLE 0, TX_EN_MODE 0, TX_BYTE_SWAP 0, TX_MUX_SEL 1, TX_AUTO_SEQUENCE 1, TX_START_DELAY 0x40, TX_CLOCK_DELAY 0x6
With this configuration, the customer connected my hardware through an ethernet switch (unmanaged) to a computer and trying to send some data from computer using PING command. Using Wireshark to capture the traffic and the customer can see packets going from the computer but nothing coming back from the target hardware.
We expected with the TX_AUTO_SEQUENCE set, the received data on MII_RX port should send the data from RX L1 FIFO to the MII TX Port selected by the TX_MUX_SEL.
Is there something that could still prevent this?
Thanks!
--Gunter