This example is a TCP/UDP IP application using the LwIP networking stack, coupled with ethernet driver (ENET)
On AM62LX, we can do ethernet based communication using CPSW as HW mechanism
The example does the following:
| Parameter | Value |
|---|---|
| CPU + OS | a53ss0-0_freertos |
| Toolchain | gcc-arch64 |
| Boards | am62lx-evm |
| Example folder | source/networking/enet/core/examples/lwip/enet_lwip_cpsw |
| Feature | Section | Description | Remarks/Default Setting |
|---|---|---|---|
| Enable Packet Pool Allocation | TI Networking / Enet (CPSW) / Packet Pool Config | Flag to enable packet buffer memory allocation from enet utils library. In case the application allots packet memory via other mechanism, this should be disabled to avoid utils memory wastage. | Default is true. |
| Only Enable Packet Info Allocation | TI Networking / Enet (CPSW) / Packet Pool Config | Flag to enable packet buffer memory allocation from enet utils library. In case the application allots packet via other mechanism, this should be disabled to avoid utils memory wastage. | Default is true. |
| Number of Tx Packet | TI Networking / Enet (CPSW) / DMA channel config | No of Tx packets required for DMA channel | Default is 16. |
| Number of Rx Packet | TI Networking / Enet (CPSW) / DMA channel config | No of Rx packets required for DMA channel | Default is 32. |
| Netif instance | TI Networking / Enet (CPSW) / LWIP Interface config | No of netifs allocated by the example | Only one netif should be set to default when more than one netif is allocated. |
| Argument | Meaning |
|---|---|
| -s | Run server |
| -c | Run Client [Ex: -c 192.168.1.102] |
| -u | UDP |
| -b | Bandwidth [Used in UDP, Ex: 100M M->Mbits] |
| -i | Output interval in Sec [Ex: -i1 1sec interval] |
| -t | Time in sec [Ex: -t60 60sec] |
| -p | Port number [Ex: -p 5555] |
| -w | Windows size [Ex: -w 1M M->Mbits] |
| -d | Bi-directional traffic |
| -l | Length [Ex: -l 1046 1046bytes] |
| -V | Used when IPv6 address is used instead of IPv4 |
Modify code in file lwipcfg.h file as below to set USE_DHCP and -USE_AUTOIP as '0'
> ping 192.168.1.100
iperf tests as shown below. Below steps have been tried with a Linux Ubuntu 18.04 host PC running bash shelliperf if not installed by doing below > sudo apt install iperf
0.0.0.0 thenlink_callback==UP message, if not check the ethernet cable