APPLICATION NOTE. Scope. Reference Documents. Software Ethernet Bridge on SAMA5D3/D4. Atmel SMART SAMA5D3/D4 Series

Similar documents
AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

AT60142H/HT. Rad-Hard 512Kx8 Very Low Power CMOS SRAM ERRATA-SHEET. Active Errata List. Errata History. Abbreviations. 1.

AT03975: Getting Started with SAM L21. Descripton. Features. SMART ARM-Based Microcontroller APPLICATION NOTE

USER GUIDE. ATWILC1000 Getting Started with SAMA5D3 Xplained Board. Atmel SmartConnect. Introduction. Features

SAMA5D2 Quad SPI (QSPI) Performance. Introduction. SMART ARM-based Microprocessor APPLICATION NOTE

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

GM8126 MAC DRIVER. User Guide Rev.: 1.0 Issue Date: December 2010

APPLICATION NOTE. AT6486: Using DIVAS on SAMC Microcontroller. SMART ARM-Based Microcontroller. Introduction. Features

EDBG. Description. Programmers and Debuggers USER GUIDE

AT03262: SAM D/R/L/C System Pin Multiplexer (SYSTEM PINMUX) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

ATAES132A Firmware Development Library. Introduction. Features. Atmel CryptoAuthentication USER GUIDE

APPLICATION NOTE. Generating Random Secrets. ATSHA204A, ATECC108A, and ATECC508A. Description. Topics

ATECC508A Public Key Validation. Introduction. Atmel CryptoAuthentication APPLICATION NOTE

AT06467: Getting started with SAM D09/D10/D11. Features. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

This user guide describes how to run the Atmel ATWINC3400 Bluetooth Low Energy (BLE) Provisioning demo from out-of-box conditions.

APPLICATION NOTE. 3-lead CONTACT Package Usage. ATSHA204A, ATECC108A, and ATECC508A. Introduction. 3-lead CONTACT Package

Ethernet1 Xplained Pro

AT21CS Series Reset and Discovery. Introduction. Serial EEPROM APPLICATION NOTE

Smart RF Device Family - Getting Started Guide. Features. Description. References ATAN0115 APPLICATION NOTE

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

AT11512: SAM L Brown Out Detector (BOD) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

Native route discovery algorithm

AT10942: SAM Configurable Custom Logic (CCL) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

APPLICATION NOTE. AT11008: Migration from ATxmega16D4/32D4 Revision E to Revision I. Atmel AVR XMEGA. Introduction. Features

AVR42772: Data Logger Demo Application on XMEGA A1U Xplained Pro. Introduction. Features. AVR XMEGA Microcontrollers APPLICATION NOTE

APPLICATION NOTE. AT04470: Differences between SAM D21 Variants A, B, and L. 32-bit Microcontroller. Introduction

DGILib USER GUIDE Atmel-42771A-DGILib_User Guide-09/2016

QT3 Xplained Pro. Preface. Atmel QTouch USER GUIDE

ATECC108/ATSHA204 USER GUIDE. Atmel Firmware Library. Features. Introduction

AT88CK101 HARDWARE USER GUIDE. Atmel CryptoAuthentication Development Kit. Atmel CryptoAuthentication AT88CK101 Daughterboard

USER GUIDE. Atmel QT6 Xplained Pro. Preface

ATtiny817 QTouch Moisture Demo User Guide. Description. Features. AVR 8-bit Microcontrollers USER GUIDE

USER GUIDE EDBG. Description

APPLICATION NOTE. AT05567: TC Capture on External Interrupt with the Event System on SAM D20. Preface ASF PROJECT DOCUMENTATION

USER GUIDE. ATWINC1500 Xplained Pro. Preface

APPLICATION NOTE. CryptoAuthentication Personalization Guide. ATSHA204A and ATECC508A. Introduction. Features

APPLICATION NOTE. Atmel QT4 Xplained Pro User Guide ATAN0114. Preface

ATtiny104 Xplained Nano. Preface. AVR 8-bit Microcontrollers USER GUIDE

QT2 Xplained Pro. Preface. Atmel QTouch USER GUIDE

APPLICATION NOTE. AT03324: Atmel REB212BSMA-EK Quick Start Guide. Atmel MCU Wireless. Introduction

APPLICATION NOTE. How to Securely Switch Atmel s LIN Transceiver ATA6662/ATA6662C to Sleep Mode ATA6662/ATA6662C. Concerning Atmel ATA6662

StampA5D3x/PortuxA5/PanelA5. Quickstart Guide

USER GUIDE. ZigBit USB Stick User Guide. Introduction

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

APPLICATION NOTE. Atmel AT03261: SAM D20 System Interrupt Driver (SYSTEM INTERRUPT) SAM D20 System Interrupt Driver (SYSTEM INTERRUPT)

Let us ping! First we will learn the Hello World of a networked machine.

AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

RELEASE NOTES. GNU Toolchain for Atmel ARM Embedded Processors. Introduction

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

USER GUIDE. Atmel Segment LCD1 Xplained Pro. Preface

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

SAM4 Reset Controller (RSTC)

APPLICATION NOTE. Atmel AT03160: Migrating Bootloader from ATxmega128A1 to other Atmel XMEGA Devices. Atmel AVR XMEGA. Features.

a clock signal and a bi-directional data signal (SCL, SDA)

AT88RF04C. CryptoRF EEPROM Memory 13.56MHz, 4 Kilobits SUMMARY DATASHEET. Features

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

SMART ARM-based Microcontrollers ATSAMD21E16LMOTOR USER GUIDE

I/O1 Xplained Pro. Preface. Atmel MCUs USER GUIDE

Internet Tool Practice. 이지민 장동현

Enabling CDC-ETHER Connection for Skywire CAT1

Atmel QT600 Quick Start Guide Touch Solutions

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

AT88SC3216CRF. CryptoRF EEPROM Memory 13.56MHz, 32 Kilobits SUMMARY DATASHEET. Features

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

USER GUIDE. Atmel QT1 Xplained Pro. Preface

Enabling CDC_ETHER Connection for Skywire GSM CAT1

IP over IB Protocol. Introduction CHAPTER

Atmel ATtiny1634 MCU Atmel ATA SBC LIN transceiver with integrated voltage regulator Touch. Three Atmel QTouch buttons One Atmel QTouch slider

FiberstoreOS IP Service Configuration Guide

Atmel and the use of Verilator to create uc Device Models

Application Note Using the ATV750, ATV750B, and ATF750C Erasable Programmable Logic Device Introduction 1.1 Device Names and Pin/Node Assignments

AT07942: SAM4L Asynchronous Timer (AST) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AT697E. Application Note. Checking AT697E Code for Occurrence of LDF/FPOPd Instructions Sequence with a dependency on an Odd-Numbered Register

ATZB-SAMR21-XPRO. Preface. SmartConnect USER GUIDE

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

CIS Test 1- Practice - Fall 2011

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

64K (8K x 8) Battery-Voltage Parallel EEPROM with Page Write and Software Data Protection AT28BV64B

USER GUIDE. Atmel maxtouch Xplained Pro. Preface

APPLICATION NOTE. Atmel AVR536: Migration from ATmega644 to ATmega644A. 8-bit Atmel Microcontrollers. Introduction

USER GUIDE. Atmel OLED1 Xplained Pro. Preface

AN4113 Application note

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

GM8126 U-BOOT. User Guide Rev.: 0.2 Issue Date: May 2011

Network Test and Monitoring Tools

TABLE OF CONTENTS. ACI Solutions Team by Tomas de Leon 2

STEVAL-PCC010V1. ST802RT1A Ethernet PHY demonstration board with STM32F107 controller add-on board. Features. Description

APPLICATION NOTE. AT06863: SAM4L Peripheral Event Controller (PEVC) SAM4L Peripheral Event Controller (PEVC) ASF PROGRAMMERS MANUAL

Quick guide for configuring a system with multiple IP-LINKs

USER GUIDE. Wireless Production Test Reference Protocol Specification Document. Atmel MCU Wireless. Description

POWER GUIDE APPLICATION NOTE

Section 5 SERCOM. Tasks SPI. In this section you will learn:

AVR32901: EVKLCD100/EVKLCD101 Hardware User's Guide. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

DATASHEET 4D SYSTEMS. 4D Raspberry Pi Serial Adaptor TURNING TECHNOLOGY INTO ART. 4D-Serial-Pi-Adaptor

SonicWall Mobile Connect for Chrome OS

LS9200 User Guide LinkSprite Technologies, Inc.

Transcription:

SMART APPLICATION NOTE Software Ethernet Bridge on SAMA5D3/D4 Atmel SMART SAMA5D3/D4 Series Scope The Atmel SMART SAMA5D3/D4 series are high-performance, power-efficient embedded MPUs based on the ARM Cortex -A5 processor. This application note takes SAMA5D3 as an example to explain how to implement it as an Ethernet bridge in a PC network to connect two or more LANs, using EMAC/GMAC ports. Reference Documents Title Literature No. SAMA5D3 Series Datasheet 11121 SAMA5D4 Series Datasheet 11238 SAMA5D3x-EK User Guide 11180 SAMA5D4-EK User Guide 11294

Table of Contents Scope.................................................................................. 1 Reference Documents................................................................. 1 Table of Contents...................................................................... 2 1. Introduction....................................................................... 3 2. SAMA5D3/D4 Ethernet Port Overview............................................. 3 3. Ethernet Bridge Description...................................................... 4 4. Software Ethernet Bridge Implementation........................................ 5 4.1 Hardware Connection............................................................. 5 4.2 Software Implementation........................................................... 5 4.2.1 How to Build Linux........................................................ 5 4.2.2 How to Set PC and Bridge................................................. 11 4.2.3 How to Run the Bridge................................................... 12 4.2.3.1 Bridge Acts in Full Duplex Mode (EMAC GMAC).................... 12 4.2.3.2 Bridge Acts in Simplex Mode (GMAC EMAC)...................... 13 4.2.3.3 Bridge Acts in Simplex Mode (EMAC GMAC)...................... 13 4.2.4 Bandwidth and CPU Usage of Ethernet Bridge................................. 14 5. Summary......................................................................... 15 Revision History...................................................................... 16 2

1. Introduction The SAMA5D3 connectivity peripherals include one Gigabit Ethernet Media Access Controller (GMAC) and one Ethernet Media Access Controller (EMAC) (1). The SAMA5D4 connectivity peripherals include two 10/100 Ethernet Media Access Controller (GMAC). With these two MACs, SAMA5D3/D4 can be implemented in different network applications. This application note provides an example of how to set SAMA5D3 as a software Ethernet bridge. 2. SAMA5D3/D4 Ethernet Port Overview The EMAC module of SAMA5D3 implements a 10/100 Mbps Ethernet MAC compatible with the IEEE 802.3 standard using an address checker, statistics and control registers, receive and transmit blocks, and a DMA interface. This EMAC only supports RMII interface to the physical layer and can work in full-duplex and half-duplex mode. The GMAC module of SAMA5D3 implements a 10/100/1000 Mbps Ethernet MAC compatible with the IEEE 802.3 standard. The GMAC can operate in either half or full duplex mode at all supported speeds. This GMAC can be configured as MII, GMII and RGMII interface. The GMAC module of SAMA5D4 implements a 10/100 Mbps Ethernet MAC compatible with the IEEE 802.3 standard. The GMAC can operate in either half or full duplex mode at all supported speeds. This GMAC can be configured as MII and RMII interface. For the detailed information on EMAC and GMAC of the SAMA5D3/D4 series, please refer to the SAMA5D3 Series datasheet and SAMA5D4 Series datasheet available on www.atmel.com. 1. The number of available EMAC/GMAC peripherals is device specific. Please refer to the SAMA5D3 Series datasheet for details. 3

3. Ethernet Bridge Description An Ethernet bridge is used to interconnect LANs using IEEE 802 standards. The standard features of bridges are defined by IEEE 802.1. There are four types of network-bridging technologies: Simple Multiport Learning or Transparent Source route Simple bridge and Multiport bridge are the basic bridges which have ports connected to two (or more) otherwise separate LANs. Packets received on one port may be retransmitted on another port. Unlike a repeater, a bridge will not start retransmission until it has received the complete packet. Consequently, stations on either side of a bridge may be transmitting simultaneously without causing collisions. Bridges, like repeaters, do not modify the contents of a packet in any way. However, unlike repeaters they may, under some circumstances, originate traffic. A learning bridge examines the source field of every packet it sees on each port and builds up a picture of which addresses are connected to which ports. This means that it will not retransmit a packet if it knows that the destination address is connected to the same port as the bridge saw the packet on. Source route bridging is used on token ring networks. It is a hybrid of source routing and transparent bridging, which allows source routing and transparent bridging to coexist on the same bridged network. The operation of the bridge is simpler and many of the bridging functions are performed by the end systems, particularly the sources. Note: The description of Ethernet Bridge types is extracted from http://www.wikipedia.org/. Please refer to it for more details. Figure 3-1 illustrates how an Ethernet bridge connects two LANs. Figure 3-1. Ethernet Bridge Diagram 4

4. Software Ethernet Bridge Implementation This section explains how to implement a simple bridge with SAMA5D3 by software. 4.1 Hardware Connection In this example, a SAMA5D35 Evaluation Kit (SAMA5D35-EK) serves as the bridge, which is connected between two PCs (see Figure 4-1). (Currently, the network cards in most PCs are Gigabit, which can auto-negotiate with EMAC and GMAC according to the type of Ethernet port they connect to). Figure 4-1. Connection Diagram Between SAMA5D35-EK and PC PC-1 SAMA5D35 Bridge PC-2 EMAC EMAC GMAC GMAC 4.2 Software Implementation After the hardware connection is done, configure each part to make sure that they all work in correct modes. 4.2.1 How to Build Linux 1. Rebuild Linux kernel to make sure the Ethernet Bridge function is enabled. (1) //Get the source code from server $ git clone git://github.com/linux4sam/linux-at91.git Cloning into 'linux-at91'... remote: Counting objects: 3875625, done. remote: Compressing objects: 100% (624675/624675), done. remote: Total 3875625 (delta 3220631), reused 3875625 (delta 3220631) Receiving objects: 100% (3875625/3875625), 1.09 GiB 903 KiB/s, done. Resolving deltas: 100% (3220631/3220631), done. $ cd linux-at91/ //Checkout from the github repository $ git checkout origin/linux-3.10-at91 -b <your branch> //Configure and build the Linux kernel $ export CROSS_COMPILE=arm-linux-gnueabi- $ export ARCH=arm $ make clean $ make sama5_defconfig $ make menuconfig //In the following interface, select the needed components to make sure //the network driver is included. 1. Both ETH0 and ETH1 need to be enabled for the Ethernet Bridge function. However, for SAMA5D4, ETH1 is disabled by default, due to pin conflict with LCD power. To enable ETH1: * Before rebuilding Linux kernel, first disable LCD node and enable ETH1 node in the corresponding dts file. * Close JP2 jumper on SAMA5D4-EK board to disable LCD power and enable ETH1. 5

//Enter Menu Networking support -> Networking options, select Network packet filtering framework (Netfilter). 6

//Open the submenu IP: Netfilter Configuration, select all the options. 7

//Back to Menu Networking options, select 802.1d Ethernet Bridging. //Save the changes and Exit the menu, build the image. $ make uimage $ make dtbs 8

2. Rebuild the rootfs to add bridge utility support. //Get the buildroot source code $ git clone git://github.com/linux4sam/buildroot-at91.git Cloning into 'buildroot-at91'... remote: Counting objects: 117708, done. remote: Total 117708 (delta 0), reused 0 (delta 0) Receiving objects: 100% (117708/117708), 33.74 MiB 687 KiB/s, done. Resolving deltas: 100% (79958/79958), done. $ cd buildroot-at91/ //Checkout from the github repository $ git checkout origin/buildroot-2012.11.1-at91 -b <your branch> //Configure and build rootfs # make sama5d3ekdemo_defconfig # make menuconfig //Add support for bridge-utils: Package Selection for the target-> //Networking applications->bridge-utils // brctl file will be generated in //[work directory of buildroot]/output/build/bridge-utils-1.5 directory. 9

$ make 3. Download the Linux image to SAMA5D35-EK. 10

4.2.2 How to Set PC and Bridge Note: Here, Linux is the default OS installed on the PC. 1. Setting on PC-1: //Configure IP address: 192.168.3.2 $ sudo ifconfig eth0 down $ sudo ifconfig eth0 192.168.3.2 $ sudo ifconfig eth0 up 2. Setting on PC-2: //Configure IP address: 192.168.3.3 $ sudo ifconfig eth1 down $ sudo ifconfig eth1 192.168.3.3 $ sudo ifconfig eth1 up 3. Build and configure the bridge (SAMA5D35-EK): //Create a bridge named mybridge # brctl addbr mybridge //Include eth0 and eth1 into mybridge # brctl addif mybridge eth0 # brctl addif mybridge eth1 //Set the network modes # ifconfig eth0 0.0.0.0 promisc # ifconfig eth1 0.0.0.0 promisc # ifconfig mybridge 192.168.3.4 netmask 255.255.255.0 # ifconfig mybridge up //Show mybridge # ifconfig mybridge mybridge Link encap:ethernet HWaddr FE:A4:3A:79:3E:5C inet addr:192.168.3.4 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::fca4:3aff:fe79:3e5c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:468 (468.0 B) After setting up the bridge on SAMA5D35-EK, test if mybridge works correctly by using the following commands. //ping PC-2 IP address on PC-1 $ ping 192.168.3.3 PING 192.168.3.3 (192.168.3.3) 56(84) bytes of data. 64 bytes from 192.168.3.3: icmp_seq=1 ttl=64 time=2.31 ms 64 bytes from 192.168.3.3: icmp_seq=2 ttl=64 time=0.606 ms 64 bytes from 192.168.3.3: icmp_seq=3 ttl=64 time=0.585 ms //ping PC-1 IP address on PC-2 $ ping 192.168.3.2 PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data. 64 bytes from 192.168.3.2: icmp_seq=1 ttl=64 time=0.546 ms 64 bytes from 192.168.3.2: icmp_seq=2 ttl=64 time=0.477 ms 64 bytes from 192.168.3.2: icmp_seq=3 ttl=64 time=0.613 ms The above text messages show that the bridge on SAMA5D35-EK has been successfully built and configured. Now it looks like PC-1 and PC-2 exist in the same network. 11

4.2.3 How to Run the Bridge When acting as the bridge, the SAMA5D35-EK needs to receive packages from EMAC/GMAC and send the package to the other GMAC/EMAC, which increases the load on the CPU. Perform the following tests to identify the CPU load and the bridge transfer speed by setting SAMA5D35 in three working modes: Bridge acts in Full Duplex mode (Server Client or EMAC GMAC) Bridge acts in Simplex mode (Server Client or EMAC GMAC) Bridge acts in Simplex mode (Client Server or GMAC EMAC) The commands vary in the different working modes as detailed in the following sections. 4.2.3.1 Bridge Acts in Full Duplex Mode (EMAC GMAC) PC-1: //Set the working mode as UDP and work as Server $ iperf -u -s PC-2: //Set the working mode as UDP, work as Client and transfer in full duplex mode $ iperf -u -c 192.168.3.2 -t 120 -i 1 -b 100M -d Transfer report on server command line: ------------------------------------------------------------ Client connecting to 192.168.3.3, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 110 KByte (default) ------------------------------------------------------------ [ 5] local 192.168.3.2 port 5001 connected with 192.168.3.3 port 57594 [ 3] local 192.168.3.2 port 57673 connected with 192.168.3.3 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-120.0 sec 2.10 GBytes 100 Mbits/sec [ 3] Sent 1537212 datagrams [ 5] 0.0-120.1 sec 1.99 GBytes 95.1 Mbits/sec 0.150 ms 82205/1538420 (5.3%) [ 5] 0.0-120.1 sec 1 datagrams received out-of-order [ 3] Server Report: [ 3] 0.0-120.0 sec 1.99 GBytes 95.0 Mbits/sec 0.031 ms 82606/1537211 (5.4%) [ 3] 0.0-120.0 sec 44 datagrams received out-of-order On the bridge (SAMA5D35-EK), use the following command to capture the information on CPU usage: //Capture the log file of CPU usage top -d 1 -n 100 grep idle > XXX.log 12

4.2.3.2 Bridge Acts in Simplex Mode (GMAC EMAC) PC-1: //Set the working mode as UDP and work as Server $ iperf -u -s PC-2: //Set the working mode as UDP, work as Client and transfer in half duplex mode $ iperf -u -c 192.168.3.2 -t 120 -i 1 -b 100M Transfer report on server command line: ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 110 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.3.2 port 5001 connected with 192.168.3.3 port 51201 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 4] 0.0-120.1 sec 1.33 GBytes 95.2 Mbits/sec 0.147 ms 52908/1025641 (5.2%) [ 4] 0.0-120.1 sec 1 datagrams received out-of-order On the bridge (SAMA5D35-EK), use the following command to capture the information on CPU usage: //Capture the log file of CPU usage top -d 1 -n 100 grep idle > XXX.log 4.2.3.3 Bridge Acts in Simplex Mode (EMAC GMAC) PC-2: //Set the working mode as UDP and work as Server $ iperf -u -s PC-1: //Set the working mode as UDP, work as Client and transfer in half duplex mode $ iperf -u -c 192.168.3.3 -t 120 -i 1 -b 100M Transfer report on server command line: ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 110 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.3.3 port 5001 connected with 192.168.3.2 port 58165 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 4] 0.0-120.2 sec 1.33 GBytes 95.3 Mbits/sec 14.498 ms 50315/1024735 (4.9%) [ 4] 0.0-120.2 sec 206 datagrams received out-of-order On the bridge (SAMA5D35-EK), use the following command to capture the information on CPU usage: //Capture the log file of CPU usage top -d 1 -n 100 grep idle > XXX.log 13

4.2.4 Bandwidth and CPU Usage of Ethernet Bridge Table 4-1 shows the transfer speed and CPU usage of the software Ethernet Bridge during data transfer with different bandwidth settings. The corresponding relation between the CPU Usage and the transfer speed is illustrated in Figure 4-2. Table 4-1. iperf Bandwidth Setting (Mbps) Transfer Speed and CPU Usage of Software Bridge in Three Modes E2G Speed EMAC GMAC EMAC GMAC GMAC EMAC G2E Speed CPU Usage (%) E2G Speed CPU Usage (%) G2E Speed CPU Usage (%) 10 10 10 10 10 6 10 5 20 20 20 20 20 11 19.9 10 30 30 30 29 30 15 30 14 40 40 40 38 40 22 40 18 50 50 50 47 50 26 50 22 60 59.9 59.9 57 60 31 60 27 70 70 69.9 66 70 37 70 31 80 79.9 79.7 77 80 42 80 35 90 90.9 90.5 89 90.4 47 91.2 40 100 95.1 95 94 95.3 50 95.2 42 Figure 4-2. CPU Usage vs. Transfer Speed CPU Usage (%) 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% 0.0 20.0 40.0 60.0 80.0 100.0 Speed (Mbps) EMAC2GMAC GMAC2EMAC FULLDUPLEX 14

5. Summary This software Ethernet Bridge solution introduced in this application note provides an alternate option to customers to realize an Ethernet Bridge function with SAMA5D3/D4 products, especially when without hardware Ethernet Bridge. During the operation of the software bridge function, SAMA5D3/D4 CPU involvement is required. From the above analysis of the relation between the CPU usage and different transfer speeds, we arrive at the conclusion that with the increase of the transmission bandwidth, the CPU usage also increases with linearity. Based on the application requirements and spare CPU bandwidth, customers can decide the speed of the Ethernet Bridge in their applications. 15

Revision History Table 5-1. Revision History Doc. Rev. Date Changes A 30-Jan-2015 First release 16

X ARM Connected Logo X X X X X Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 www.atmel.com 2015 Atmel Corporation. / Rev.:. Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. ARM, ARM Connected logo, and others are the registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ( Safety-Critical Applications ) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.