This example is a TCP/UDP IP application using the LwIP networking stack, coupled with ethernet driver (ENET)
On AM273X, we can do ethernet based communication using CPSW as HW mechanism
The examples do below
Parameter | Value |
---|---|
CPU + OS | r5fss0-0_freertos r5fss0-1_freertos |
Toolchain | ti-arm-clang |
Boards | am273x-evm |
Example folder | examples/networking/lwip/enet_lwip_cpsw |
Feature | Section | Description | Remarks/Default Setting |
---|---|---|---|
Mdio Manual Mode Enable | TI Networking / Enet (CPSW) | Flag to enable MDIO manual mode in example. Driver support for Manual mode is enabled, so this parameter configures manual mode in the example. | Default is true. If your silicon is affected with errata i2329— MDIO interface corruption, then TI suggests to use MDIO_MANUAL_MODE as software workaround. |
Enable Packet Pool Allocation | TI Networking / Enet (CPSW) | Flag to enable packet buffer memory allocation from enet utils library. It should be disabled to avoid utils memory wastage, in case application allots packet via other mechanism. | Default is true. If enabled size of pkt pool size depends on 'Large Pool Packet Size', 'Large Pool Packet Count', 'Medium Pool Packet Size', 'Medium Pool Packet Count', 'Small Pool Packet Size' and 'Small Pool Packet Count'. EnetMem_allocEthPkt API uses this memory to allocate the DMA Ethernet packet. |
Only Enable Packet Info Allocation | TI Networking / Enet (CPSW) | Flag to allocate only the DMA Packet Info structures, this does not include the buffer memory. This is useful when the buffer memory is internally allocated by the application. (Ex- Lwip pools) | Default is true. If enabled "PktInfoMem Only Count" determines the number of additional DMA Packet Info structures allocated. EnetMem_allocEthPktInfoMem uses this memory to allocate empty DMA Packet Info structures. |
Number of Tx Packet | TI Networking / Enet (CPSW) / DMA channel config | No of Tx packets required for DMA channel | Default is 16. For LwIP example, the Tx packet buffer memory is internally allocated in lwippools.h. Only the DMA Pkt Info structures are allocated via sysCfg, so this number should match the "PktInfoMem Only Count" described in the above item. To increase the Tx packet count, user needs to update the number correspondingly at "PktInfoMem Only Count" and lwippools.h and build the libs. |
Number of Rx Packet | TI Networking / Enet (CPSW) / DMA channel config | No of Rx packets required for DMA channel | Default is 32. It contributes to the size of Pkt Mem Pool, DMA ring buffer and accessories size. Rx packet buffer memory is completely mananged with application sysCfg, this is done by using Rx custom Pbuf in LwIP. |
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 |
> 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