2 Atmel SAMA5D3 Xplained

Contents

2.1 Board Overview

The SAMA5D3 Xplained is a fast prototyping and evaluation platform for microprocessor-based design. The board comes with a rich set of ready to use connectivity and storage peripherals and expansion headers for easy customization. A Linux distribution and software package gets you evaluating fast. A USB device connector can be used to power the board as well as programming and debugging it.

See [ATSAMA5D3-XPLD] for details about SAMA5D3 Xplained board.

../../../../_images/at91-sama5d3-xplained.jpg

Fig. 2.3 SAMA5D3 Xplained Board Interfaces and Connectors

2.1.1 Block Diagram

../../../../_images/at91-sama5d3-xplained-block-diagram.png

Fig. 2.4 SAMA5D3 Xplained Board Block Diagram

2.1.2 Photos

../../../../_images/at91-sama5d3-xplained-angled.jpg

Fig. 2.5 SAMA5D3 Xplained Angled View

../../../../_images/at91-sama5d3-xplained-top.jpg

Fig. 2.6 SAMA5D3 Xplained Top View

../../../../_images/at91-sama5d3-xplained-bottom.jpg

Fig. 2.7 SAMA5D3 Xplained Bottom View

2.1.3 Specification

Table 2.4 at91-sama5d3-xplained Specification

Model

SAMA5D3 Xplained

Processor

Atmel SAMA5D36 (324-ball BGA package)
1 × ARM Cortex-A5
frequency up to 536 MHz

Memory

256 MiB DDR2 SDRAM

Storage

Full-size SD card slot
1 × SLC NAND Flash (Micron MT29F2G08ABAEAWP, 256 MiB)
1 × optional serial SPI EEPROM
1 × optional 1-Wire EEPROM

USB

2 × USB 2.0 Host with power switch
1 × Micro-AB USB 2.0 device

Ethernet

1 × Gigabit Ethernet PHY (KSZ9031, RGMII 10/100/1000)
1 × Ethernet PHY (KSZ8081, RMII 10/100)

Debug

1 × JTAG interface connector
1 × Serial debug console interface (3.3V level)

Expansion Connectors

Arduino R3 compatible set of connectors
(GPIO, TWI, SPI, USART, UART, Audio and ISI interfaces
are accessible through these headersXPRO set of connectors)

Other

1 × LCD interface connector, LCD TFT Controller with overlay, alpha-blending, rotation, scaling and color space conversion
1 × RTC
2 × User LED
1 × User push button

Dimensions

127 × 75 × 20 mm

Power Source

Micro-AB USB

Power

5V/0.5A from USB

2.2 Build Targets

2.2.1 Machines

Table 2.5 Supported Machines

Board[1]

Target YAML[2]

Machine[3]

Target Recipe(s)[4]

Running Media[5]

Installation Media[6]

SAMA5D3 Xplained

at91-sama5d3-xplained-sd.yml

at91-sama5d3-xplained-sd

tanowrt-image-full-swu

SD card

at91-sama5d3-xplained-nand.yml

at91-sama5d3-xplained-nand

tanowrt-image-full-swu-factory

Internal NAND flash

SD card

2.2.2 Images

Table 2.6 Supported Images

Read-Only Root Filesystem Image

Recipe[7]

Supported by Target(s)

Description

tanowrt-image-full

tanowrt-image-full

All

Standard TanoWrt image.

tanowrt-image-full-swu

All

Standard TanoWrt image and firmware upgrade image. When building this image, tanowrt-image-full will also be built as dependency.

tanowrt-image-full-swu-factory

at91-sama5d3-xplained-nand.yml

Factory installation image for standard TanoWrt image. When building this image, tanowrt-image-full and tanowrt-image-full-swu will also be built as dependencies.

2.3 Build

Please read the common information on how to perform a TanoWrt images build and preparing the build environment in section “Building TanoWrt”.

See also

  • See section Section 2.2.1 to select the required target YAML file (<target-yml>).

  • See section Section 2.2.2 to select the required root filesystem image recipe (<target-recipe>).

  • See section Section 2.5 for detailed information about the produced build artifacts.

2.3.1 Examples

2.3.1.1 Build Default Images for SAMA5D3 Xplained Board

For SD Card

$ kas build targets/kas/at91-sama5d3-xplained-sd.yml

Default images will be produced to boot and run from the SD card on the SAMA5D3 Xplained target board.

For Internal NAND

$ kas build targets/kas/at91-sama5d3-xplained-nand.yml

An initial factory installation image will be generated, intended to run from the SD card. The installer image will install the default image to the internal NAND flash memory and further the SAMA5D3 Xplained board will boot and run from the NAND flash memory.

2.4 Partitioning Layouts

2.4.1 SD Card

The partitioning and data layout of the SD card image for the SAMA5D3 Xplained board are shown in the figure below.

../../../../_images/at91-sama5d3-xplained-layout-sd.svg

Fig. 2.8 SAMA5D3 Xplained Partitions Layout for SD Card

2.4.2 NAND

The partitioning and data layout of the NAND image for the SAMA5D3 Xplained board are shown in the figure below.

../../../../_images/at91-sama5d3-xplained-layout-nand.svg

Fig. 2.9 SAMA5D3 Xplained Partitions Layout for NAND

2.5 Produced Build Artifacts

All produced build artifacts are stored in the ~/tanowrt/build/tanowrt-glibc/deploy/images/<MACHINE> directory. Refer to table Produced Build Artifacts for a description of some common (not all) build artifacts.

Table 2.7 Produced Build Artifacts

Artifact

Target(s)

Description

Bootloader (AT91Bootstrap)

at91bootstrap.bin-sdcard

All

AT91Bootstrap binary for SD card images.

at91bootstrap.bin-nand

at91-sama5d3-xplained-emcc.yml

AT91Bootstrap binary for NAND flash images.

Bootloader (U-Boot)

startup-<MACHINE>.img

All

U-Boot startup script.

startup-factory-<MACHINE>.img

at91-sama5d3-xplained-nand.yml

U-Boot startup script for factory installation image.

u-boot-initial-env-<MACHINE>-sdcard

All

U-Boot initial environment image for SD card image.

u-boot-initial-env-<MACHINE>-nand

at91-sama5d3-xplained-nand.yml

U-Boot initial environment image for internal NAND flash.

u-boot-<MACHINE>.bin-sdcard

All

U-Boot binary image for booting from SD card.

u-boot-<MACHINE>.bin-nand

at91-sama5d3-xplained-nand.yml

U-Boot binary image for booting from internal NAND flash.

Linux Kernel and DTB

fitImage-<MACHINE>.bin

All

Flattened Image Tree (FIT) image with Linux kernel and Device Tree Blobs (DTB).

fitImage-<MACHINE>.ext4

at91-sama5d3-xplained-sd.yml

FIT image packed into an ext4 file system image.

at91-sama5d3_xplained.dtb

All

Target Device Tree Blob (DTB).

fitImage-tanowrt-image-initramfs-swu-factory-<MACHINE>

at91-sama5d3-xplained-nand.yml

FIT image for SWU factory installation image with initramfs image.

Images

<rootfs-image>-<MACHINE>.sdcard.img

at91-sama5d3-xplained-sd.yml

SD card image including all required partitions for booting and running the system. This image is ready to be written to the SD card using the dd utility or similar (see Writing Images).

<rootfs-image>-swu-factory-<MACHINE>.sdcard.img

at91-sama5d3-xplained-nand.yml

SD card factory installation image. This image is ready to be written to the SD card using the dd utility or similar (see Writing Images).

tanowrt-image-initramfs-swu-factory-<MACHINE>.cpio.gz

at91-sama5d3-xplained-nand.yml

Root filesystem initramfs image for factory installtion image. This image is included in fitImage-tanowrt-image-initramfs-swu-factory-<MACHINE>.

<rootfs-image>-<MACHINE>.squashfs-lzo

All

Root filesystem image (squashfs with LZO compression).

<rootfs-image>-swu-<MACHINE>.swu

All

Firmware upgrade image.

Note

<MACHINE> in the artifacts path and artifact file names are replaced by the actual value of the MACHINE BitBake variable for the chosen target. <rootfs-image> is replaced by the actual read-only root filesystem image name.

For example, below is the lists of artifacts produced by the at91-sama5d3-xplained-nand.yml and at91-sama5d3-xplained-sd.yml target builds. There are two types of listings here — a complete listing, and a reduced listing without the symbolic links display.

2.5.1 Build Artifacts Listings for at91-sama5d3-xplained-sd.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/at91-sama5d3-xplained-sd]$ ls -gGh | grep -v -e "^l"
total 134M
-rwxr-xr-x 2  20K Aug 10 03:16 at91bootstrap.bin-sdcard
-rw-r--r-- 2  49K Aug 10 03:17 at91-sama5d3_xplained--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd-20220810001425.dtb
-rw-r--r-- 2 4.5M Aug 10 03:17 fitImage--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd-20220810001425.bin
-rw-r--r-- 2 6.3M Aug 10 03:17 fitImage-4.19.78+gitAUTOINC+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd.ext4
-rw-r--r-- 2 6.3M Aug 10 03:17 fitImage-at91-sama5d3-xplained-sd.ext4
-rw-r--r-- 2 1.6K Aug 10 03:17 fitImage-its--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd-20220810001425.its
-rw-r--r-- 2 4.4M Aug 10 03:17 fitImage-linux.bin--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd-20220810001425.bin
-rw-r--r-- 2 2.0M Aug 10 03:17 modules--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-sd-20220810001425.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2 2.1K Aug 10 03:16 startup.img
-rw-r--r-- 2   19 Aug 10 03:16 startup.img.version
-rw-r--r-- 2  65K Aug 10 03:18 tanowrt-image-full-at91-sama5d3-xplained-sd-20220810001425.rootfs.manifest
-rw-r--r-- 2 940M Aug 10 03:19 tanowrt-image-full-at91-sama5d3-xplained-sd-20220810001425.rootfs.sdcard.img
-rw-r--r-- 2  24M Aug 10 03:18 tanowrt-image-full-at91-sama5d3-xplained-sd-20220810001425.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Aug 10 03:19 tanowrt-image-full-at91-sama5d3-xplained-sd-20220810001425.rootfs.version
-rw-r--r-- 2 342K Aug 10 03:18 tanowrt-image-full-at91-sama5d3-xplained-sd-20220810001425.testdata.json
-rw-r--r-- 2 5.5K Aug 10 03:18 tanowrt-image-full.env
-rw-r--r-- 2 2.7K Aug 10 03:18 tanowrt-image-full-sdimage-at91-swu-a-b.wks
-rw-r--r-- 2  31M Aug 10 03:19 tanowrt-image-full-swu-at91-sama5d3-xplained-sd-20220810001425.swu
-rw-r--r-- 2  192 Aug 10 03:16 u-boot-initial-env-at91-sama5d3-xplained-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug 10 03:16 u-boot-initial-env-at91-sama5d3-xplained-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2 719K Aug 10 03:16 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin

2.5.2 Build Artifacts Listings for at91-sama5d3-xplained-nand.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/at91-sama5d3-xplained-nand]$ ls -gGh | grep -v -e "^l"
total 123M
-rwxr-xr-x 2  15K Aug 10 03:20 at91bootstrap.bin-nand
-rw-r--r-- 2  16K Aug 10 03:20 at91bootstrap.bin-nand-pmecc
-rwxr-xr-x 2  20K Aug 10 03:20 at91bootstrap.bin-sdcard
-rw-r--r-- 2  20K Aug 10 03:20 at91bootstrap.bin-sdcard-pmecc
-rw-r--r-- 2  49K Aug 10 03:23 at91-sama5d3_xplained--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.dtb
-rw-r--r-- 2 4.5M Aug 10 03:23 fitImage--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.bin
-rw-r--r-- 2 1.6K Aug 10 03:23 fitImage-its--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.its
-rw-r--r-- 2 2.3K Aug 10 03:23 fitImage-its-tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.its
-rw-r--r-- 2 4.4M Aug 10 03:23 fitImage-linux.bin--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.bin
-rw-r--r-- 2  11M Aug 10 03:23 fitImage-tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.bin
-rw-r--r-- 2 2.0M Aug 10 03:23 modules--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d3-xplained-nand-20220810001922.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2  890 Aug 10 03:20 startup-factory.img
-rw-r--r-- 2   19 Aug 10 03:20 startup-factory.img.version
-rw-r--r-- 2 2.2K Aug 10 03:20 startup.img
-rw-r--r-- 2   19 Aug 10 03:20 startup.img.version
-rw-r--r-- 2  66K Aug 10 03:23 tanowrt-image-full-at91-sama5d3-xplained-nand-20220810001922.rootfs.manifest
-rw-r--r-- 2  23M Aug 10 03:23 tanowrt-image-full-at91-sama5d3-xplained-nand-20220810001922.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Aug 10 03:23 tanowrt-image-full-at91-sama5d3-xplained-nand-20220810001922.rootfs.version
-rw-r--r-- 2 342K Aug 10 03:23 tanowrt-image-full-at91-sama5d3-xplained-nand-20220810001922.testdata.json
-rw-r--r-- 2  29M Aug 10 03:23 tanowrt-image-full-swu-at91-sama5d3-xplained-nand-20220810001922.swu
-rw-r--r-- 2  42M Aug 10 03:23 tanowrt-image-full-swu-factory-at91-sama5d3-xplained-nand-20220810001922.sdcard.img
-rw-r--r-- 2 6.2K Aug 10 03:22 tanowrt-image-full-swu-factory.env
-rw-r--r-- 2  843 Aug 10 03:22 tanowrt-image-full-swu-factory-sdimage-at91-swu-factory.wks
-rw-r--r-- 2 6.6M Aug 10 03:22 tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand-20220810001922.rootfs.cpio.gz
-rw-r--r-- 2 3.4K Aug 10 03:22 tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand-20220810001922.rootfs.manifest
-rw-r--r-- 2   24 Aug 10 03:23 tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand-20220810001922.rootfs.version
-rw-r--r-- 2 348K Aug 10 03:22 tanowrt-image-initramfs-swu-factory-at91-sama5d3-xplained-nand-20220810001922.testdata.json
-rw-r--r-- 2   95 Aug 10 03:20 u-boot-initial-env-at91-sama5d3-xplained-nand-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug 10 03:20 u-boot-initial-env-at91-sama5d3-xplained-nand-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2  192 Aug 10 03:20 u-boot-initial-env-at91-sama5d3-xplained-nand-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug 10 03:20 u-boot-initial-env-at91-sama5d3-xplained-nand-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2 726K Aug 10 03:20 u-boot-nand-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2 719K Aug 10 03:20 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin

2.6 Writing Images

2.6.1 Writing Image to SD Card

No special information about writing images to SD card for SAMA5D3 Xplained. See common instructions in Writing Images to SD Card or USB Flash Drive section.

Examples

Writing factory installation image for the at91-sama5d3-xplained-nand.yml target to the SD card /dev/mmcblk1:

$ dd if=tanowrt-image-full-swu-factory-at91-sama5d3-xplained-nand.sdcard.img of=/dev/mmcblk1

Writing bootable card image for the at91-sama5d3-xplained-sd.yml target to the SD card /dev/mmcblk1:

$ dd if=tanowrt-image-full-at91-sama5d3-xplained-sd.sdcard.img of=/dev/mmcblk1

2.6.2 Writing Image to NAND Flash

For the initial flashing of the internal NAND memory it is recommended to use the special image of the initial factory installation. If you choose a build target (see Build Targets for details) that assumes using the factory installation image for the initial flashing of the device, a factory installation image (<rootfs-image>-swu-factory-<MACHINE>.sdcard.img) will be automatically generated during the build process (see Build). To write the factory installation image to a SD card, follow the instructions from Writing Images to SD Card or USB Flash Drive section.

When you boot device from the prepaired SD card with factory installation image the installation of TanoWrt to the internal NAND flash memory will be done automatically. The detailed installation log is available on the debug UART. After the installation is complete, the board will power off automatically. You need to remove SD card with the installation image and power on the board. When the board boots up, the installed system will be booted from the internal NAND flash memory.

Caution

Be aware that during the installation all existing data on the internal NAND flash will be permanently lost.

2.6.3 Erasing Internal NAND Flash

You can erase the internal NAND flash memory in the following ways:

  • Linux command line;

  • U-Boot command line;

  • special utilities and USB connection with PC.

Erasing Internal NAND Flash Using Linux Command Line

If the device has a bootable Linux system, you can erase the internal NAND flash by the following command entered in the Linux terminal:

[root@tanowrt ~]# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ 20000 -- 100 % complete

Note

This command does not erase entire flash memory, but only single MTD device (/dev/mtd0) of NAND flash memory, reserved for the AT91Bootstrap bootloader (see SAMA5D3 Xplained Partitions Layout for NAND).

Note that if the running Linux distribution is not TanoWrt, the device name of the required MTD device may be different. To identify the proper device name, refer to the contents of the /proc/mtd file:

[root@tanowrt /]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "at91bootstrap"
mtd1: 00140000 00020000 "uboot"
mtd2: 00040000 00020000 "startup"
mtd3: 00040000 00020000 "ubootenv"
mtd4: 06800000 00020000 "system_a"
mtd5: 06800000 00020000 "system_b"
mtd6: 02e00000 00020000 "rootfs_data"

2.7 Booting and Running

The default boot sequence for SAMA5D3 devices is shown in the table below.

Sequence

Boot Device

SAMA5D3 Xplained

1

SPI0 CS0

2

MCI0

SD Card

3

MCI1

4

EBI NAND

Internal NAND Flash

5

SPI0 CS1

6

TWI0 EEPROM

7

SAM-BA Monitor

2.7.1 Booting from SD Card

  1. Insert the SD card into the slot on the SAMA5D3 Xplained (power is off).

  2. Power on board.

  3. TanoWrt will be booting from SD card.

  4. Log in to system using default credentials.

2.7.2 Booting from NAND Flash

  1. Remove any bootable SD card from the slot on the SAMA5D3 Xplained (power is off).

  2. Power on board.

  3. TanoWrt will be booting from NAND flash (see Writing Image to NAND Flash for details about writing TanoWrt image to NAND flash memory).

  4. Log in to system using default credentials.

2.8 Serial Console

Serial console on SAMA5D3 Xplained board are available through 6-pin serial communication header J23 Debug. Connect the USB to TTL serial cable as described below. Don’t connect the VCC wire of the USB to TTL converted, connect only TX, RX and GND wires.

SAMA5D3 Xplained J23 6-pin Header

Signal

Pin 2

TX

Pin 3

RX

Pin 6

GND

See Fig. 2.3 for example connection USB to TTL converter with SAMA5D3 Xplained board.

The default serial console settings for SAMA5D3 Xplained for U-Boot and kernel are described in the table below.

Parameter

Value

Baudrate

115200

Data bits

8

Stop bits

1

Parity

none

Flow control

none

2.9 Default Network Configuration

SAMA5D3 Xplained board has two RJ45 Ethernet ports:

  1. Ethernet port 1: interface eth0 (Gigabit Ethernet)

  2. Ethernet port 2: interface eth1 (10/100 Ethernet)

By default Ethernet port 1 (eth0 interface) are joined into a bridge (br-lan interface). Bridge (br-lan) configured to obtain IP configuration via DHCP client. To see obtained IP configuration use the following command:

[root@tanowrt ~]# ifstatus lan | jsonfilter -e '@["ipv4-address"][0].address'
192.168.0.39

In this example, the device got the IP address 192.168.0.39 via DHCP.

The Ethernet port 2 (eth1 interface) is a separate network interface included in the WAN firewall zone with enabled translation (NAT) from LAN zone. The IP address of the WAN (eth1) interface is also configured with a DHCP client. A firewall with blocking rules for incoming traffic is enabled on the WAN interface. Therefore, there is no access to the web configuration interface through this interface.

To see obtained IP configuration for WAN network use the following command:

[root@tanowrt ~]# ifstatus wan | jsonfilter -e '@["ipv4-address"][0].address'
10.10.0.168

In this example, the device got the IP address 10.10.0.168 via DHCP on the WAN interface (eth1).

Also you can connect to the board using USB network connection (usb0 interface). USB network interface configured with static IP address 192.168.128.1 with enabled DHCP server with pool with single IP address for client (your PC) 192.168.128.100.

Ethernet ports eth0 and eth1 have enabled LLDP for Rx and Tx state by default.

2.10 Web User Interface

The WebUI can be accessed via any Ethernet port bridged to LAN network or via USB RNDIS connection through HTTP(s) protocol. You must see something like this in browser:

../../../../_images/page-login.png

Fig. 2.10 LuCI WebUI Login Page

../../../../_images/at91-sama5d3-xplained-luci-status.png

Fig. 2.11 LuCI WebUI Overview Page

2.11 Firmware Upgrade

No special information about firmware upgrade. Use produced .swu artifact for upgrading running system.

See also

See common instructions in Firmware Upgrade section.

2.12 Additional Information

Here are sections with various additional information about the SAMA5D3 Xplained and the operation of TanoWrt on it.

2.13 References