SAM9X75 Curiosity LAN Kit - Getting Started Guide for Linux®

Last modified by Microchip on 2024/08/08 11:38

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.

Confirm the following components are present out of the box:

  • SAM9X75 Curiosity Board 
  • LAN8840 EDS2 SODIMM extension board (P/N: EV12N54A)
  • SD card
  • USB A to USB C cable (power)

Required components not included in the box:

  • Serial to USB dongle
  • Ethernet cable

This getting started guide will allow you to perform an “Iperf” networking test between your PC (acting as Transmission Control Protocol (TCP) Client) and the SAM9X75 Curiosity Board (acting as TCP Server), through your local network infrastructure.

Information

Note: 

  • The instructions in this manual are intended for the iperf3 version of the networking test service available in Linux® distribution.  
  • The command line instructions are for a PC running Linux. 

Setup

    Download the image

Download the Yocto Project® image from the repo:
image-link
Place in any directory of your choice.

Copy the downloaded file into the SD memory card using Balena Etcher.

Insert the SD memory card into the host computer.
Download, install and run balenaEtcher.
balenaEtcher window Flash from File button
Click image to enlarge.
Select the target to download.
balenaEtcher window Select Target button
Click image to enlarge.
Select SD card mounted.
balenaEtcher  Select target window
Click image to enlarge.

Select Flash.

The SD card will be ready for use once flashing is completed.

balenaEtcher window Flash button
Click image to enlarge.

Back to Top


Connect the components as described in the following steps:
Ethernet cable to J5 connector on the LAN8840 EDS2 Daughter Card EV12N54A,
SD card inserted on the SD Boot J14 slot,
Serial USB dongle to UART DEBUG J35 header, and
USB-A to Micro USB-B cable to J3 Micro USB-B port for power.

Connection setup

 

 

Information

Note:

  • SAM9X75 Curiosity Board Serial Terminal set up in Step 4 will be referred to as "TCP Server" terminal.
  • The Host Computer command line started in Step 6 will be referred to as "TCP Client" prompt. 

Back to Top

Set Up and Start SAM9X75 Curiosity Board Serial Terminal

Set up SAM9X75 Curiosity Board Serial Terminal on the host computer.

On the host computer, open a Serial Terminal with the following settings:
  • Baud Rate: 115200
  • Data: 8-bit
  • Parity: None
  • Stop: 1-bit
  • Flow Control: None
Check serial port in the system.
user@comp:~/test$ dmesg | egrep
                     -i 'serial|ttyUSB'
Confirm serial port settings, assuming ttyUSB0 is the hardware connected.
user@comp:~/test$ stty -F /dev/ttyUSB0 -a
Set the parameters.
user@comp:~/test$ stty -F /dev/ttyUSB0
             115200 cs8 -cstopb -parenb
Set the serial port to use, for example, ttyS0 is selected.
user@comp:~/test$ setserial -g /dev/ttyUSB0
A built-in serial emulator is "cu". Assuming  /dev/ttyUSB0 is the terminal you want to use, run cu:
user@comp:~/test$ cu -l dev/ttyUSB0

Back to Top


Press the RESET (SW3) button on the SAM9X75 Curiosity Board to force a reset.
When the system is ready, the Serial Terminal you set up in Step 4 will show a prompt. This is the TCP Server terminal.

 Verify the login prompt is shown on the TCP Server terminal.

TCP Server terminal

Type or 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.

Getting a lease with the DHCP server should be automatic. To make sure, on the TCP Server terminal, type "udhcp" in the command line:  

# udhcpc 

TCP Server terminal

On the TCP Server terminal, type "ifconfig" on the command line and verify the internet address is assigned to the SAM9X75 Curiosity Board.

# ifconfig 

TCP Server terminal

Note the address assigned. This will be used to run the iperf3 test.  In the screenshot, the address assigned is 10.14.63.85.

Back to Top

Perform the Test with SAM9X75 Curiosity Board as the TCP Server

On the TCP Server terminal, run the iperf3 command:
# iperf3 -s -i 1

Back to Top

Start PC Command Line

On the host computer run a command line application to execute the iperf application.

Run Linux Terminal Program. This will be the TCP Client Terminal Program:

Run Linux Terminal Program

Back to Top


Execute the iperf3 command with the noted internet address assigned (which is 10.14.63.85 in the screenshot) in Step 5.5.
user@computer-name:~$ iperf3 -c 10.14.63.85 -i 1 -t 5

This will execute the Iperf test where the SAM9X75 Curiosity Board as TCP Server and the host computer as the TCP Client.

Back to Top


Confirm the test results in the TCP Server Serial Terminal used in Step 7.

The TCP Server Terminal will show the results of the test similar to the accompanying image.

TCP Server terminal

The TCP Client Terminal will show the test results similar to the accompanying image:

TCP Server terminal

Back to Top

Additional Information

Back to Top

Troubleshooting

Common

Serial Terminal is not showing anything

There are multiple possible reasons that the terminal does not show anything:

  • Double-check that the RX-TX signals of the serial cable are properly connected to the RX-TX signals of the board.
  • Double-check that ground signal is properly connected.
  • Verify that the SD card contains the right files.

Running iperf command in the host 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 iperf command matches the target IP address.
Terminal shows RomBoot message.
  • Verify if the SD card contains the right files.
  • Verify that the SD card is inserted properly.
I ran 'cu' in Linux command line, how do I exit? Press keys Shift and (tilde) then the (dot) key and cu will exit and return to the command line
I already have 'picocom' installed. How do I use 'picocom' instead of 'cu' for my serial terminal? 

To use 'picocom' replace all of Step 4 with the following:

  • Connect the Serial-USB dongle to the host PC
  • Assuming  /dev/ttyUSB0 is  the terminal you want to use, run:
user@comp:~/test$ picocom -b 115200 -r -l /dev/ttyUSB0

Back to Top