SAM9X75 Curiosity LAN Kit - Quick Start Guide for Linux®
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 kit. For a deeper dive into the features and capability of the kit, refer to the links provided in the "Additional Information" section of this guide.
This quick start guide demonstrates how to perform an iPerf3 networking test between a Linux PC (acting as iPerf3 TCP Client) and the SAM9X75 Curiosity Board (acting as iPerf3 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 board and the PC. (Admin rights are 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)
Setup
Download the image
Download the Yocto Project® image from the image-link repository.
Place in any directory of your choice.
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 linux4sam-poky-sam9x75_curiosity-headless-2024.10.img.bz2.
Click image to enlarge.
Click Select target to download.
Click image to enlarge.
Select the mounted SD card.
Click image to enlarge.
Select Flash.
The SD card will be ready for use once flashing is completed.
Click image to enlarge.
Connect the components as described in the following steps:
Ethernet cable to J5 connector on the LAN8840 EDS2 Daughter Card EV12N54A.
Other side of the Ethernet cable shall be plugged in the PC (network configuration 1) or in 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 iPerf3 TCP server
Set up SAM9X75 Curiosity Board Serial Terminal on the PC.
Identify the serial USB connection by monitoring the last lines of dmesg command (may need sudo rights).
The /dev/ttyUSBx number will be used to configure the terminal emulator.
On the PC, open your favorite terminal emulator with the following settings:
- Baud Rate: 115200
- Data: 8-bit
- Parity: None
- Stop: 1-bit
- Flow Control: None
For example with picocom, assuming the serial USB interface is /dev/ttyUSB0:
Press the RESET (SW3) button on the SAM9X75 Curiosity Board to force a reset.
When the system is ready, the SAM9X75 serial Terminal set up in Step 4 will show a prompt. This is the TCP Server terminal.
Verify the login prompt is shown on the SAM9X75 serial Terminal.
Enter "root" to log in. No password is required.
In case you do not see the prompt, press the enter key to force the prompt to refresh.
- In network configuration 1:
- Without a DHCP server, a static IP address (for example 192.168.100.11 here) needs to be assigned to the board with the following command:
- In network configuration 2:
- Getting a lease with the DHCP server should be automatic. To make sure, type "udhcpc" in the command line:
Finally, type "ifconfig" on the command line and verify the internet address is assigned to the SAM9X75 Curiosity Board.
Note the assigned IP address as it will be used to run the iPerf3 test.
In this example, the IP address is 192.168.100.11 in network configuration 1 and 10.14.63.85 in network configuration 2. It will be different in your environment.
Start the iPerf3 TCP Server on the SAM9X75 Curiosity Board by running the following command:
Configure the Linux PC and start the iPerf3 TCP Client
Open a Linux terminal program on the PC:
Complete the following for network configuration 1 and network configuration 2.
In network configuration 1:
The PC Ethernet IP address and mask must be manually configured (sudo rights are needed).
First, use the ifconfig command to find out the name of the PC Ethernet interface. In this example, we will consider it is eth0.
If the board IP is 192.168.100.11, then, for example configure the PC IP with 192.168.100.2/255.255.255.0 with the following command:
In network configuration 2:
No manual change is needed; the DHCP will automatically assign the right IP address.
In the PC terminal, start the TCP Client iPerf3 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).
Come back to the SAM9X75 serial terminal and confirm the test results:
Congratulations! Your SAM9X75 board running Linux 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 (User Guide, Design Files)
- LAN8840 EDS2 Daughter Card (User Guide, Design Files)
- SAM9X75 Product Page (Datasheet, Errata)
- MPLAB® Harmony v3 Solutions
- MPLAB Discover Code Examples
- Linux Solutions
Troubleshooting
Common
The SAM9X75 serial terminal is not showing anything. | There are multiple possible reasons why the terminal does not show anything:
|
Running iPerf3 command in the PC terminal results in Connection refused error. [ 1] tcp connect to 10.14.63.70 port 5001 failed (Connection refused) on 2024-05-31 11:43:21 (US Mountain Standard Time). | Verify the IP address used when sending the iPerf3 command matches the target IP address. |
Terminal shows 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 -p serial -b sam9x75-curiosity -a sdmmc -c write:linux4sam-poky-sam9x75_curiosity-headless-2024.04.img |