Demo of TCP/IP Stack for ADSP-SC573 under FreeRTOS
This project demonstrates the TCP/IP stack with TCP and UDP loopback tests.
The demo is configured for use with the ADSP-SC573 EZ-Board equipped with the Analog Devices ADSP-SC573 MCU. The hardware configuration is shown below:
- Connect the USB-UART connector to a host PC and open a terminal connection to the virtual serial port (115200@8N1).
- Download and start the project.
- If the value of DEMO_ENABLE_DHCP in demo.c is 0 (the default), a static IP address is configured (the default IP address is 192.168.1.105). If the value of DEMO_ENABLE_DHCP is 1 the board requests an IP address via DHCP.
- Connect a UTP cable to the 10/100/1000 Ethernet port (J4) and to a port on a switch in your local network (if using DHCP) or directly to a test PC's network card (if using a static IP address).
- The link status and IP address are printed to the terminal window.
Note: For testing HCC recommends the PCATTCP tool. This can be downloaded from the Web.
Depending on the value of DEMO_UDP_TX_TEST in demo.c, two test modes are available as described below:
DEMO_UDP_TX_TEST == 0
This setting means normal operation with TCP or UDP loopback tests.
You can ping the board using "ping <ip address>" from a tool like a Windows command prompt.
This is built into the project. It simply echoes all incoming data on TCP_RX_PORT to TCP_TX_PORT.
Test this as follows:
- Start a command prompt and execute: pcattcp.exe -r -p 179
This listens for TCP datagrams on port 179 (default value of TCP_TX_PORT in the tcp test module).
- Start another command prompt and execute: pcattcp.exe -t -l 1400 -n 2000 -w 0 -p 178 <IP address>
This sends 2000 packets of size 1400 bytes without gaps to port 179 (the default value of TCP_RX_PORT in the TCP Test module) to <IP address>.
This is built into the project. It simply echoes all incoming data on UDP_RX_PORT to UDP_TX_PORT.
Test this as follows:
- Start a command prompt and execute: pcattcp.exe -u -r -p 279
This listens for UDP datagrams on port 279 (default value of UDP_TX_PORT in the UDP Test module).
- Start another command prompt and execute: pcattcp.exe -u -t -l 1300 -n 2000 -w 1 -p 278 <IP address>
This sends 2000 packets of 1300 bytes size with 1ms gaps to port 279 (the default value of UDP_RX_PORT in the UDP Test module) to <IP address>.
DEMO_UDP_TX_TEST != 0
This setting means using a continuous UDP stream. The board sends UDP packets continuously in this mode. You can check throughput by using a network analyzer application (for example Wireshark).
Note: This project was developed using CrossCore Embedded Studio v18.104.22.168.