phasedarray
New member
Hi all,
I asked this on the NXP community forums and received no reply, and since I'm prototyping on (and might even do small production run with) a Teensy 4.1 I thought to ask here in case someone has some idea.
At work we have a proprietary communication system that uses off the shelf ethernet physical layer. Our existing FPGA-based solution interfaces over RMII to a standard ethernet PHY, but everything above the physical layer is custom. The PHY handles 4b:5b, and clock+data recovery for us, and our FPGA handles the rest of the encoding/decoding. However this FPGA is going EOL and our FPGA engineer has long since retired. I've therefore been thinking of trying to access this raw RMII data and process it myself on an RT1060 or similar, given that we were already looking at the RT series for embedded UI.
I've been looking through the RT reference manuals have come up with 3 potential options:
I am quite unfamiliar with Ethernet above the physical layer and I am not sure that in scenario 1 whether we can sufficiently disable functionality of the MAC that the MAC's FIFOs exactly match what is transmitted to / received from the PHY and that nothing will be padded/discarded/checksummed etc.
With scenario 2 I am still not sure if it's possible to directly access the RMII TX / RX buffers and if they are unmodified by the MAC when the MAC is enabled, and when the MAC is disabled I don't know if the RMII interface continues to run.
I am most comfortable with the idea of using 3 because I have used FlexIO before, but it is also potentially a lot more work if we can indeed just disable / ignore the MAC, and it uses up FlexIO buffers which we also want to use for communication with another proprietary device.
FWIW I found some discussions on this forum about sending raw Ethernet frames, but as far as I understand from the code (for instance https://github.com/ssilverman/QNEthernet.git) the headers/checksum etc are still handled on the MAC/library. What I need to do is access the raw deserialized PHY RMII data and handle the decoding myself.
Many thanks in advance
Rob
I asked this on the NXP community forums and received no reply, and since I'm prototyping on (and might even do small production run with) a Teensy 4.1 I thought to ask here in case someone has some idea.
At work we have a proprietary communication system that uses off the shelf ethernet physical layer. Our existing FPGA-based solution interfaces over RMII to a standard ethernet PHY, but everything above the physical layer is custom. The PHY handles 4b:5b, and clock+data recovery for us, and our FPGA handles the rest of the encoding/decoding. However this FPGA is going EOL and our FPGA engineer has long since retired. I've therefore been thinking of trying to access this raw RMII data and process it myself on an RT1060 or similar, given that we were already looking at the RT series for embedded UI.
I've been looking through the RT reference manuals have come up with 3 potential options:
- Edit the Ethernet RCR (Receive Control Register), TCR (Transmit Control Register) and Receive and Transmit Accelerator Function Config Registers (RACC and TACC) to disable all of the MAC functions and operate use the MAC FIFOs as if we were working with normal Ethernet.
- Set up DMA to copy the ENET TX and RX buffers from/to somewhere else for processing and ignore the rest of the MAC.
- Use FlexIO to emulate RMII, which would also allow us to do some masking/sync word detection more efficiently.
I am quite unfamiliar with Ethernet above the physical layer and I am not sure that in scenario 1 whether we can sufficiently disable functionality of the MAC that the MAC's FIFOs exactly match what is transmitted to / received from the PHY and that nothing will be padded/discarded/checksummed etc.
With scenario 2 I am still not sure if it's possible to directly access the RMII TX / RX buffers and if they are unmodified by the MAC when the MAC is enabled, and when the MAC is disabled I don't know if the RMII interface continues to run.
I am most comfortable with the idea of using 3 because I have used FlexIO before, but it is also potentially a lot more work if we can indeed just disable / ignore the MAC, and it uses up FlexIO buffers which we also want to use for communication with another proprietary device.
FWIW I found some discussions on this forum about sending raw Ethernet frames, but as far as I understand from the code (for instance https://github.com/ssilverman/QNEthernet.git) the headers/checksum etc are still handled on the MAC/library. What I need to do is access the raw deserialized PHY RMII data and handle the decoding myself.
Many thanks in advance
Rob