SAM9X75 Curiosity LAN Kit - Quick Start Guide for MPLAB® Harmony v3
Introduction
Thank you for taking the time to evaluate the SAM9X75 Curiosity LAN Kit. This guide will help you run the demonstration application included with the board. For a deeper dive into the features and capability of the board, refer to the links provided in the "Additional Information" section of this guide.
This quick start guide demonstrates how to perform an iPerf networking test between a Windows PC (acting as iPerf TCP Client) and the SAM9X75 Curiosity Board (acting as iPerf TCP Server).
Two network configurations are possible. Select the preferred one based on your local configuration:
- Network configuration 1:
- The board and PC are connected directly with an Ethernet cable. In this case, a static IP will have to be manually assigned to the PC (admin rights needed).
- Network configuration 2:
- The board and PC are connected through the local network infrastructure or a router. In this case a Dynamic Host Configuration Protocol (DHCP) server will automatically assign an IP address to the board and the PC. (Ensure there are no IT restrictions for plugging the board on the local network)
MPLAB® Harmony Demo Setup
Download the iperf.zip from the repository, GitHub_EV31H43A.
Unzip the downloaded iperf.zip file into any directory of your choice. Note the location where the files are unzipped. You will execute the iperf.exe from this location using a command prompt to run the TCP Client.
Download the harmony.img from the repository, GitHub_EV31H43A.
Copy the downloaded file into the SD memory card using balenaEtcher.
Insert the SD memory card into the PC.
Download, install and run balenaEtcher.
Select the downloaded harmony.img file.
Click Select target to download.
Select the mounted SD Card.
Select Flash.
The SD Card will be ready for use once flashing is completed.
Connect the components as described in the following steps:
Ethernet cable to J5 connector on the LAN8840 EDS2 Daughter Card.
The other side of the Ethernet cable needs to be plugged into the PC (network configuration 1) or a wall plug/router (network configuration 2).
SD card inserted on the SD Boot J14 slot.
Serial-USB dongle to UART DEBUG J35 header.
USB-A to Micro-USB cable to J2 Micro-USB port for power.
Set up the SAM9X75 Curiosity Board Serial Terminal and start the iPerf TCP server
Set up SAM9X75 serial terminal on the PC.
On the PC, open a Serial terminal with the following settings:
- Baud Rate: 115200
- Data: 8-bit
- Parity: None
- Stop: 1-bit
- Flow Control: None
Open PuTTY.
Open Windows Device Manager to find out which COM port to use (COM10 will be used in this example).
Open Putty > Category > Connection > Serial and configure the parameters as shown in the accompanying image (adapt the COM port to your local setup).
Press Open.
Press the RESET (SW3) button on the SAM9X75 Curiosity Board to force a reset.
When the system is ready, the SAM9X75 serial terminal will show a prompt. This is the TCP Server running on the Curiosity board and displayed on the PC.
- In network configuration 1:
- the board defines its own hardcoded IP address: 192.168.100.11
- In network configuration 2:
- the DHCP server will automatically assign an IP address to the board
Verify that the iPerf MPLAB Harmony application is running and displaying on the SAM9X75 server terminal.
Press the Enter key to show the prompt.
Note the assigned IP address as it will be used to run the iPerf test.
In this example, corresponding to network configuration 1, the IP address is 192.168.100.11.
In case of network configuration 2, the IP address will depend on your local environment.
Start the TCP Server on the SAM9X75 Curiosity Board by running the following command:
The SAM9X75 serial terminal will show that the iPerf application is started and listening:
Configure the Windows PC and start the iPerf TCP Client
In network configuration 1:
The PC Ethernet IP address and mask must be manually configured (admin rights needed).
Open Windows network settings (exact steps depend on Windows revision), and switch to manual configuration for the Ethernet interface.
Since the board IP is 192.168.100.11, manually configure for example the PC to IP = 192.168.100.2 and mask = 255.255.255.0
In network configuration 2:
No need to manually set the PC IP address. The DHCP server will automatically assign one.
On the PC, navigate to the folder where iPerf was downloaded in Step 1 and open a Command Prompt.
In the Command Prompt, start the TCP Client iPerf with the following command:
This will test the performance of the network transfers between the PC (TCP Client) and the SAM9X75 Curiosity Board (TCP Server).
The TCP Client terminal will show the results of the test:
Come back to the SAM9X75 serial terminal and confirm the test results:
Congratulations! Your SAM9X75 board running Harmony3 is now connected over Ethernet to your PC.
What's next? Look below in the additional Information section for more resources.
Additional Information
- SAM9X75 Curiosity LAN Kit
- LAN8840 EDS2 Daughter Card
- Full Demo Documentation of iperf Application for MPLAB Harmony
- MPLAB Harmony v3 Solutions
- MPLAB Discover Code examples
- Linux Solutions
Troubleshooting
The SAM9X75 serial terminal is not showing anything. | There are multiple possible reasons why the terminal does not show anything:
|
Running iperf command on the PC terminal results in a "Connection refused" error. [1] tcp connect to 10.14.63.70 port 5001 failed ("Connection refused" error) on 2024-05-31 11:43:21 (US Mountain Standard Time). | Verify that the IP address used when sending the iperf command matches the target IP address. |
The terminal shows a RomBOOT message. |
|
IT restrictions forbid the plugging of SD cards in the PC. BalenaEtcher can't be used. | Another option for programming the SD Card is to use the Microchip SAM-BA tool.
.\sam-ba.exe -p serial -b sam9X75-curiosity -a sdmmc -c write:harmony.img |