1 Atmel SAMA5D2 Xplained

Contents

1.1 Board Overview

The SAMA5D2 Xplained Ultra is a fast prototyping and evaluation platform for the SAMA5D2 series of microprocessors (MPUs) [DS60001476H]. The board includes eMMC and DDR3 memories as well as a rich set of connectivity options. Connectors and expansion headers allows for easy customization and quick access to leading edge embedded features such as the Class D amplifier or the capacitive touch controller (PTC). A Linux distribution and software package allows you to easily get started with your development.

See [ATSAMA5D2C-XULT] for details about SAMA5D2 Xplained board.

../../../../_images/at91-sama5d2-xplained.jpg

Fig. 1.8 SAMA5D2 Xplained Board Interfaces and Connectors

1.1.1 Block Diagram

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

Fig. 1.9 SAMA5D2 Xplained Board Block Diagram

1.1.2 Photos

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

Fig. 1.10 SAMA5D2 Xplained Angled View

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

Fig. 1.11 SAMA5D2 Xplained Top View

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

Fig. 1.12 SAMA5D2 Xplained Bottom View

1.1.3 Specification

Table 1.4 at91-sama5d2-xplained Specification

Model

SAMA5D2 Xplained

Processor

Atmel SAMA5D27 (289-ball BGA package)
1 × ARM Cortex-A5 with FPU
frequency up to 500 MHz

Memory

512 MiB DDR3L SDRAM

Storage

Full-size SD card slot
1 × eMMC NAND Flash (4 GB)
1 × serial SPI EEPROM (4 MiB)
1 × optional QSPI serial flash
1 × EEPROM with MAC address and serial number

USB

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

Ethernet

1 × Ethernet 10/100 Mbps PHY (RMII)

Debug

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

Expansion Connectors

Arduino R3 compatible set of connectors
XPRO set of connectors

Other

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

Dimensions

135 × 88 × 20 mm

Power Source

Micro-AB USB

Power

5V/0.5A from USB

1.2 Build Targets

1.2.1 Machines

Table 1.5 Supported Machines

Board[1]

Target YAML[2]

Machine[3]

Target Recipe(s)[4]

Running Media[5]

Installation Media[6]

SAMA5D2 Xplained (Ultra)

at91-sama5d2-xplained-sd.yml

at91-sama5d2-xplained-sd

tanowrt-image-full-swu

SD card

at91-sama5d2-xplained-emmc.yml

at91-sama5d2-xplained-emmc

tanowrt-image-full-swu-factory

Internal eMMC

SD card

1.2.2 Images

Table 1.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-sama5d2-xplained-emmc.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.

1.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 1.2.1 to select the required target YAML file (<target-yml>).

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

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

1.3.1 Examples

1.3.1.1 Build Default Images for SAMA5D2 Xplained Board

For SD Card

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

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

For Internal eMMC

$ kas build targets/kas/at91-sama5d2-xplained-emmc.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 eMMC flash memory and further the SAMA5D2 Xplained board will boot and run from the eMMC flash memory.

1.4 Partitioning Layouts

1.4.1 SD Card

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

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

Fig. 1.13 SAMA5D2 Xplained Partitions Layout for SD Card

1.4.2 eMMC

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

../../../../_images/at91-sama5d2-xplained-layout-emmc.svg

Fig. 1.14 SAMA5D2 Xplained Partitions Layout for eMMC

The eMMC boot partitions 1 (/dev/mmcblk0boot0) and 2 (/dev/mmcblk0boot1) are currently not used. Second bootloader AT91Bootstrap for this layout are placed in the serial SPI EEPROM due to some SAMA5D2 chip revisions have a eMMC boot issues [DS80000803A].

1.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 1.7 Produced Build Artifacts

Artifact

Target(s)

Description

Bootloader (AT91Bootstrap)

at91bootstrap.bin-sdcard

All

AT91Bootstrap binary for SD card images.

at91bootstrap.bin-emmc

at91-sama5d2-xplained-emcc.yml

AT91Bootstrap binary for eMMC flash images.

Bootloader (U-Boot)

startup-<MACHINE>.img

All

U-Boot startup script.

startup-factory-<MACHINE>.img

at91-sama5d2-xplained-emmc.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>-emmc

at91-sama5d2-xplained-emmc.yml

U-Boot initial environment image for internal eMMC flash.

u-boot-<MACHINE>.bin-sdcard

All

U-Boot binary image for booting from SD card.

u-boot-<MACHINE>.bin-emmc

at91-sama5d2-xplained-emmc.yml

U-Boot binary image for booting from internal eMMC 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

All

FIT image packed into an ext4 file system image.

at91-sama5d2_xplained.dtb

All

Target Device Tree Blob (DTB).

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

at91-sama5d2-xplained-emmc.yml

FIT image for SWU factory installation image with initramfs image.

Images

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

at91-sama5d2-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-sama5d2-xplained-emmc.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-sama5d2-xplained-emmc.yml

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

<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-sama5d2-xplained-emmc.yml and at91-sama5d2-xplained-sd.yml target builds. There are two types of listings here — a complete listing, and a reduced listing without the symbolic links display.

1.5.1 Build Artifacts Listings for at91-sama5d2-xplained-sd.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/at91-sama5d2-xplained-sd]$ ls -gGh | grep -v -e "^l"
total 133M
-rwxr-xr-x 2  24K Aug  7 00:33 at91bootstrap.bin-sdcard
-rw-r--r-- 2  44K Aug  7 00:22 at91-sama5d2_xplained--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd-20220806211906.dtb
-rw-r--r-- 2 4.5M Aug  7 00:22 fitImage--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd-20220806211906.bin
-rw-r--r-- 2 6.3M Aug  7 00:22 fitImage-4.19.78+gitAUTOINC+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd.ext4
-rw-r--r-- 2 6.3M Aug  7 00:22 fitImage-at91-sama5d2-xplained-sd.ext4
-rw-r--r-- 2 1.6K Aug  7 00:22 fitImage-its--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd-20220806211906.its
-rw-r--r-- 2 4.4M Aug  7 00:22 fitImage-linux.bin--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd-20220806211906.bin
-rw-r--r-- 2 2.0M Aug  7 00:22 modules--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-sd-20220806211906.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2 2.1K Aug  7 00:33 startup.img
-rw-r--r-- 2   19 Aug  7 00:33 startup.img.version
-rw-r--r-- 2  67K Aug  7 00:36 tanowrt-image-full-at91-sama5d2-xplained-sd-20220806211906.rootfs.manifest
-rw-r--r-- 2 940M Aug  7 00:37 tanowrt-image-full-at91-sama5d2-xplained-sd-20220806211906.rootfs.sdcard.img
-rw-r--r-- 2  24M Aug  7 00:37 tanowrt-image-full-at91-sama5d2-xplained-sd-20220806211906.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Aug  7 00:37 tanowrt-image-full-at91-sama5d2-xplained-sd-20220806211906.rootfs.version
-rw-r--r-- 2 343K Aug  7 00:36 tanowrt-image-full-at91-sama5d2-xplained-sd-20220806211906.testdata.json
-rw-r--r-- 2 5.5K Aug  7 00:37 tanowrt-image-full.env
-rw-r--r-- 2 2.7K Aug  7 00:37 tanowrt-image-full-sdimage-at91-swu-a-b.wks
-rw-r--r-- 2  31M Aug  7 00:37 tanowrt-image-full-swu-at91-sama5d2-xplained-sd-20220806211906.swu
-rw-r--r-- 2  192 Aug  7 00:33 u-boot-initial-env-at91-sama5d2-xplained-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug  7 00:33 u-boot-initial-env-at91-sama5d2-xplained-sd-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2 476K Aug  7 00:33 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin

1.5.2 Build Artifacts Listings for at91-sama5d2-xplained-emmc.yml Target

[~/tanowrt/build/tanowrt-glibc/deploy/images/at91-sama5d2-xplained-emmc]$ ls -gGh | grep -v -e "^l"
total 163M
-rwxr-xr-x 2  23K Aug  7 00:38 at91bootstrap.bin-emmc
-rwxr-xr-x 2  24K Aug  7 00:38 at91bootstrap.bin-sdcard
-rw-r--r-- 2  44K Aug  7 00:41 at91-sama5d2_xplained--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.dtb
-rw-r--r-- 2 4.5M Aug  7 00:41 fitImage--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.bin
-rw-r--r-- 2 6.3M Aug  7 00:41 fitImage-4.19.78+gitAUTOINC+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc.ext4
-rw-r--r-- 2 6.3M Aug  7 00:41 fitImage-at91-sama5d2-xplained-emmc.ext4
-rw-r--r-- 2 1.6K Aug  7 00:41 fitImage-its--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.its
-rw-r--r-- 2 2.3K Aug  7 00:41 fitImage-its-tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.its
-rw-r--r-- 2 4.4M Aug  7 00:41 fitImage-linux.bin--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.bin
-rw-r--r-- 2  16M Aug  7 00:41 fitImage-tanowrt-image-initramfs-swu-factory-4.19.78+gitAUTOINC+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc.ext4
-rw-r--r-- 2  12M Aug  7 00:41 fitImage-tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.bin
-rw-r--r-- 2  16M Aug  7 00:41 fitImage-tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc.ext4
-rw-r--r-- 2 2.0M Aug  7 00:41 modules--4.19.78+git0+046113c438-tano0.2.20.20.0.0-at91-sama5d2-xplained-emmc-20220806213751.tgz
drwxr-xr-x 7  260 Jul 27 16:28 sam-ba
-rw-r--r-- 2  890 Aug  7 00:39 startup-factory.img
-rw-r--r-- 2   19 Aug  7 00:39 startup-factory.img.version
-rw-r--r-- 2 2.1K Aug  7 00:39 startup.img
-rw-r--r-- 2   19 Aug  7 00:39 startup.img.version
-rw-r--r-- 2  68K Aug  7 00:41 tanowrt-image-full-at91-sama5d2-xplained-emmc-20220806213751.rootfs.manifest
-rw-r--r-- 2  23M Aug  7 00:42 tanowrt-image-full-at91-sama5d2-xplained-emmc-20220806213751.rootfs.squashfs-lzo
-rw-r--r-- 2   24 Aug  7 00:42 tanowrt-image-full-at91-sama5d2-xplained-emmc-20220806213751.rootfs.version
-rw-r--r-- 2 343K Aug  7 00:41 tanowrt-image-full-at91-sama5d2-xplained-emmc-20220806213751.testdata.json
-rw-r--r-- 2  30M Aug  7 00:42 tanowrt-image-full-swu-at91-sama5d2-xplained-emmc-20220806213751.swu
-rw-r--r-- 2  44M Aug  7 00:42 tanowrt-image-full-swu-factory-at91-sama5d2-xplained-emmc-20220806213751.sdcard.img
-rw-r--r-- 2 6.2K Aug  7 00:41 tanowrt-image-full-swu-factory.env
-rw-r--r-- 2  843 Aug  7 00:41 tanowrt-image-full-swu-factory-sdimage-at91-swu-factory.wks
-rw-r--r-- 2 7.6M Aug  7 00:41 tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc-20220806213751.rootfs.cpio.gz
-rw-r--r-- 2 4.1K Aug  7 00:41 tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc-20220806213751.rootfs.manifest
-rw-r--r-- 2   24 Aug  7 00:41 tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc-20220806213751.rootfs.version
-rw-r--r-- 2 350K Aug  7 00:41 tanowrt-image-initramfs-swu-factory-at91-sama5d2-xplained-emmc-20220806213751.testdata.json
-rw-r--r-- 2 476K Aug  7 00:38 u-boot-emmc-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2  192 Aug  7 00:38 u-boot-initial-env-at91-sama5d2-xplained-emmc-emmc-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug  7 00:38 u-boot-initial-env-at91-sama5d2-xplained-emmc-emmc-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2  192 Aug  7 00:38 u-boot-initial-env-at91-sama5d2-xplained-emmc-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2
-rw-r--r-- 2 128K Aug  7 00:38 u-boot-initial-env-at91-sama5d2-xplained-emmc-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin
-rw-r--r-- 2 476K Aug  7 00:38 u-boot-sdcard-v2020.01-at91+gitAUTOINC+af59b26c22-tano0.2.bin

1.6 Writing Images

1.6.1 Writing Image to SD Card

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

Examples

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

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

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

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

1.6.2 Writing Image to eMMC Flash

For the initial flashing of the internal eMMC 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 eMMC 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 eMMC flash memory.

Caution

Be aware that during the installation all existing data on the internal eMMC flash and on the serial SPI EEPROM will be permanently lost.

1.6.3 Erasing Serial SPI EEPROM

You can erase the serial SPI EEPROM memory in the following ways:

  • Linux command line;

  • U-Boot command line;

  • special utilities and USB connection with PC.

Erasing SPI EEPROM Using Linux Command Line

If the device has a bootable Linux system, you can erase the SPI EEPROM by the following command entered in the Linux terminal:

[root@tanowrt ~]# dd if=/dev/zero of=/dev/mtdblock0 bs=1k count=65536

Note that if the running Linux distribution is not TanoWrt, the device name of the SPI EEPROM memory may be different.

1.7 Booting and Running

The default boot sequence for SAMA5D2 devices [DS00002791A] is shown in the table below.

Sequence

Boot Device

SAMA5D2 Xplained Board

1

SDMMC1

SD Card

2

SDMMC0

eMMC Flash

3

SMC (Static Memory Controller)

4

SPI0

SPI EEPROM

5

SPI1

6

QSPI0

Optional Serial Flash

7

QSPI1

1.7.1 Booting from SD Card

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

  2. Power on board.

  3. TanoWrt will be booting from SD card.

  4. Log in to system using default credentials.

1.7.2 Booting from eMMC Flash

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

  2. Power on board.

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

  4. Log in to system using default credentials.

1.8 Serial Console

Serial console on SAMA5D2 Xplained board are available through 6-pin serial communication header J1 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.

SAMA5D2 Xplained J1 6-pin Header

Signal

Pin 2

TX

Pin 3

RX

Pin 6

GND

See Fig. 1.8 for example connection USB to TTL converter with SAMA5D2 Xplained board.

The default serial console settings for SAMA5D2 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

1.9 Default Network Configuration

By default Ethernet port (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.35

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

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 port eth0 have enabled LLDP for Rx and Tx state by default.

1.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. 1.15 LuCI WebUI Login Page

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

Fig. 1.16 LuCI WebUI Overview Page

1.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.

1.12 Additional Information

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

1.13 References