enet_qos_txrx_multiring_transfer#
Overview#
The example shows the way to use ENET QOS driver to
receive and transmit frames supported multi-ring platforms.
this example is only supported in multi-ring platform.
This example shows how to initialize the ENET MAC.
How to use ENET MAC to transmit frames in avb supported multiple-ring platforms.
The example transmits 20 number frames. For simple demo, we create frames with some special definition.
Build transmission frames with broadcast mac address.
Build frames with unicast mac address
Send broadcast frames to ring 0 and unitcase frames to ring 1, then receive them back in associated rings.
Supported Boards#
MIMXRT1170-EVKB
Hardware requirements
Mini/micro USB cable
Loopback network cable RJ45 standard
EVK-MIMXRT1170 board
Personal Computer
Board settings
If Rx frame CRC error occurs, try to populate a suitable C66. The REV C/C1 boards populate 22pF which is high and may result in CRC errors on some of boards, if this is the case C66 may be removed or replaced by a smaller capacitor.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port(J4).
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable: 568B standard Unknowed standard J1 orange+white green+white J2 orange green J3 green+white orange+white J4 blue brown+white J5 blue+white brown J6 green orange J7 brown+white blue J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
FRDM-IMXRT1152
Hardware requirements
Type-C USB cable
Loopback network cable RJ45 standard
FRDM-IMXRT1152 board
Personal Computer
Board settings
Use the 10/100 Ethernet RJ45 port (J112).
Set J134 to position 1-2 for the shared
ENET_MDIOrouting.Set J136 to position 1-2 for the
ENET_QOS_REF_CLK1routing.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to the 10/100 Ethernet RJ45 port (J112).
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable: 568B standard Unknowed standard J1 orange+white green+white J2 orange green J3 green+white orange+white J4 blue brown+white J5 blue+white brown J6 green orange J7 brown+white blue J8 brown blue+white
Connect J1 => J3, J2 => J6. 10/100M transfer only requires J1, J2, J3, and J6. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
EVK-MIMX8MP
Hardware requirements
Micro USB cable
EVK-MIMX8M Plus board
J-Link Debug Probe
12V power supply
Personal Computer
Board settings
Example uses phy looback. No need to connect any network cable on port.
Please note this application can’t support running with Linux BSP! This example aims to show the basic usage of the IP’s function, some of the used Pads/Resources are also used by Cortex-A core.
Prepare the Demo
Connect 12V power supply and J-Link Debug Probe to the board.
Connect a micro USB cable between the host PC and the J19 USB Debug Port on the CPU board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the example.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in 3 queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
MCIMX93-EVK
Hardware requirements
USB Type-C cable
Loopback network cable RJ45 standard
MCIMX93-EVK board
Personal Computer
Board settings
No special settings are required.
Note
Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port(J501).
Download the program to the target board.
Either re-power up your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable: 568B standard Unknowed standard J1 orange+white green+white J2 orange green J3 green+white orange+white J4 blue brown+white J5 blue+white brown J6 green orange J7 brown+white blue J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
MCIMX93W-EVK
Hardware requirements
USB Type-C cable
Loopback network cable RJ45 standard
MCIMX93W-EVK board
Personal Computer
Board settings
No special settings are required.
Note
Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port(J501).
Download the program to the target board.
Either re-power up your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable: 568B standard Unknowed standard J1 orange+white green+white J2 orange green J3 green+white orange+white J4 blue brown+white J5 blue+white brown J6 green orange J7 brown+white blue J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
MCIMX93-QSB
Hardware requirements
USB Type-C cable
Loopback network cable RJ45 standard
MCIMX93-QSB board
Personal Computer
Board settings
No special settings are required.
Note
Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port(J501).
Download the program to the target board.
Either re-power up your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable: 568B standard Unknowed standard J1 orange+white green+white J2 orange green J3 green+white orange+white J4 blue brown+white J5 blue+white brown J6 green orange J7 brown+white blue J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
30 frames will be sent in 3 queues, and frames will be received in queues. The frame transmitted from the ring 0, 1, 2 is 10, 10, 10! 30 frames transmitted succeed! The frames successfully received from the ring 0, 1, 2 is 10, 10, 10!
FRDM-MCXE31B
Hardware requirements
Type-C USB cable
Loopback network cable RJ45 standard
FRDM-MCXE31B board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port (J16).
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable:
568B standard Unknowed standard
J1 orange+white green+white
J2 orange green
J3 green+white orange+white
J4 blue brown+white
J5 blue+white brown
J6 green orange
J7 brown+white blue
J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
Wait for PHY init...
Wait for PHY link up...
20 frames will be sent in 2 queue(s), and frames will be received in 2 queue(s).
The number of frames transmitted from the ring 0, 1 is 10, 10!
20 frames transmitted successfully!
The number of frames successfully received from the ring 0, 1 is 10, 10!
FRDM-MCXE32B
Hardware requirements
Type-C USB cable
Loopback network cable RJ45 standard
FRDM-MCXE32B board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert loopback network cable to Ethernet RJ45 port (J16).
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Make loopback cable:
568B standard Unknowed standard
J1 orange+white green+white
J2 orange green
J3 green+white orange+white
J4 blue brown+white
J5 blue+white brown
J6 green orange
J7 brown+white blue
J8 brown blue+white
Connect J1 => J3, J2 => J6, J4 => J7, J5 => J8. 10/100M transfer only requires J1, J2, J3, J6, and 1G transfer requires all 8 pins. Check your net cable color order and refer to 568B standard or the other standard. If your cable’s color order is not showed in the list, please connect J1~J8 based on your situation.
Running the demo
When the demo runs, the log would be seen on the terminal like:
ENET multi-ring txrx example start.
Wait for PHY init...
Wait for PHY link up...
20 frames will be sent in 2 queue(s), and frames will be received in 2 queue(s).
The number of frames transmitted from the ring 0, 1 is 10, 10!
20 frames transmitted successfully!
The number of frames successfully received from the ring 0, 1 is 10, 10!