MCUXpresso SDK Documentation

netc_share

netc_share#

Overview#

The netc_share demo application demonstrates a DHCP demo on the lwIP TCP/IP stack with NETC PSI, meanwhile, the NETC VSIs could also be used by other cores independently. For example, A core Linux BSP is using NETC VSIs.

The application acts as a DHCP client and prints the status as it is progressing. Once the interface is being bound to an IP address obtained from DHCP server, address information is printed. It does so continuously - it prints the client’s state even as the link state changes. Those link state changes are also printed.

Supported Boards#

IMX95LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX95LPD5-EVK board

  • 12V~20V power supply

  • Personal Computer

Board settings

This example uses NETC ENETC2 10G port.

Prepare the Demo
  1. Connect 12V~20V power supply to the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Program the Linux BSP to SD/eMMC. Then program flash.bin of this demo.

  5. Switch SW4 to power on the board.

Note: the flash.bin is flash_all target with mx95netc.cfg System Manager image. For A core Linux BSP side usage, refer to Linux BSP User Guide “11.6.1 i.MX95 ENETC share use case”.

Running the demo

When the demo runs, the log would be seen on the terminal like below. Both A core Linux BSP and M core share NETC ENETC2 10G port to use.

Initializing PHY...
[LINK STATE] netif=0, state=up, speed=1000M_full

************************************************
 DHCP example
************************************************
 DHCP state       : SELECTING
 DHCP state       : REQUESTING
 DHCP state       : CHECKING
 DHCP state       : BOUND

 IPv4 Address     : 192.168.0.4
 IPv4 Subnet mask : 255.255.255.0
 IPv4 Gateway     : 192.168.0.1
IMX952LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX952-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

This example uses NETC ENETC0 1G port.

IMX943-EVK
Hardware requirements
  • Micro USB cable

  • IMX943-EVK board

  • 12V~20V power supply

  • Personal Computer

Board settings

This example uses internal NETC ENETC3 pseudo port, which is connected to NETC switch. The two NETC switch 2.5G SGMII ports are initailized to use.

Prepare the Demo
  1. Connect 12V~20V power supply to the board.

  2. Connect a micro USB cable between the host PC and the J15(FTDI_DEBUG) USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Program the Linux BSP to SD/eMMC. Then program flash.bin of this demo.

  5. Switch SW1 to power on the board.

Note: the flash.bin is flash_all target with mx94evknetc.cfg System Manager image. For A core Linux BSP side usage, refer to Linux BSP User Guide “11.6.2 i.MX943 ENETC share use case”.

Running the demo

When the demo runs, the log would be seen on the terminal like below. Both A core Linux BSP and M core share NETC ENETC3 port to use.

Switch is initialized.

Initializing ENETC for demo...
Start SRTM communication
Initializing PHY...

************************************************
 DHCP example
************************************************
 DHCP state       : SELECTING
Switch port 0 link up
Handle Peer Core Linkup
 DHCP state       : BOUND
 IPv4 Address     : 192.168.0.164
 IPv4 Subnet mask : 255.255.255.0
 IPv4 Gateway     : 192.168.0.1