RoadTest: Atmel SAMA5D4 Xplained Ultra
Author: marcelodantas
Creation date:
Evaluation Type: Evaluation Boards
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Arduino DUE / Raspbery Pi
What were the biggest problems encountered?: Lack of information available for this specific board. Not all step-by-step examples would work without modification (and google searches).
Detailed Review:
Atmel SAMA5D4 Xplained Ultra – Unboxing and review
Have you ever wondered how awesome an Arduino would be if it had a very powerful processor, tons of memory and a good set of peripherals without needing any add-on shield connected? Well, look no further, behold the Atmel SAMA5D4 Xplained Ultra. It is an evaluation kit released by Atmel which packs a big punch for the price while keeping compatibility with Arduino shields form factor.
It comes out of the box already loaded with Ethernet, HDMI, USB (host) connectors and more, all powered by a 1.58 DMIPS/MHz ARM Cortex-A5 core running at 536MHz. The CPU contains a floating-point unit (FPU) which has three times the performance of the one on the ARM Cortex A8. And, interestingly enough, it has Arduino headers, following the form factor of the, also ARM based, Arduino DUE.
So let’s go step by step and find out what are the pros and cons of this board.
Packaging
The board has been shipped to me by Element14 following their good standard on packaging quality and delivery time. Inside the Element14 box there’s a neat white (not so) little box which describes the board as a fast prototyping and evaluation platform for microprocessor design, ready to run Linux and deliver 720p video at 30fps. It focuses as well on application security, delivering security features which should prevent cloning of your application.
A box inside a box, good presentation
Inside this white box there’s a standard carton box and the board, packed on an anti-static plastic bag, is neatly protected inside it by layers of foam. The board is accompanied by a Type-A to Micro-B cable, which is used to power and program the board, and a small paper card which repeats the package overview text and lists the board’s key features, which are:
What's in the box. Batteries not included.
The paper card also points you to http://www.atmel.com/sama5d4xplained/ for software and documentation.
Pros: I like the “package inside a package” model, it delivers a sense of “customer focused” product, and shows a level of care for the presentation, characteristic of the Atmel evaluation kits.
Cons: A paper card stating that “A Linux distribution and software package gets you running fast” which points you to a generic product webpage that doesn’t really get you running fast. I will need to do some digging around Atmel’s website to be able to proceed to the next step.
Board features
Before getting the board running, let’s look around it and see what’s in there:
There is also a 2x10 JTAG header on the top, closed to the left edge, which allows for development and debugging using various JTAG emulators. Always 3.3V levels, so be careful not to plug anything 5V on it.
The board has also four LEDs, two marked POWER, one marked STAT and one marked USER, and for holes for mounting/spacers/feet. The USER LED and one of the POWER LED can be controlled by user software, being connected respectively to ports PE15 and PD30 of the CPU.
The Arduino headers have their pins marked both on the top and the bottom of the board.
The SAMA5D4 compared to the SAM4S (top) and Arduino DUE (bottom).
Due to the plethora of input/output connectors, the board ends up a bit big in size. It is bigger than the Arduino DUE, bigger than the SAM4S Xplained Pro and bigger than almost every other development board I have, other than the EVK1105 and an Altera DE2. It is not “ugly” though, it is well laid out so everything around it is easily reachable without getting clumsy.
Pros: Lots of connectors, lots of peripherals, no need to stack Arduino wings for basic features like SD card, for example. I can’t wait to test some of the stuff that’s in there, especially the HDMI output. I see the unpopulated connectors as a Con, but some people may like the fact that “some assembling is required”.
Cons: I personally don’t like unpopulated chips and connectors. It gives me a feeling that “something is missing”. One example is the 5V power connector. By looking at the board schematics it seems that to have it self-powered I would not only have to solder a connector in, which is no big deal, but also solder R408, which is a very small 0R SMD resistor. Ok, I could just add a lump of solder there, but still.
Clarity of documentation
I have to assume that a board that has Arduino headers is targeted towards the Arduino user market, which I believe is formed more by electronic hobbyists than ARM Developers/Engineers, so the documentation plays a big role on the usability of this board.
All the documentation available on Atmel’s website is available here: http://www.atmel.com/tools/ATSAMA5D4-XPLD-ULTRA.aspx, which I think should be the page listed on the enclosed paper card.
On this page there are user guides and application notes, as well as software toolchains needed to build software for the board. Downloading from this page requires the creation of an Atmel account.
This page also links to http://www.at91.com/, which contains a lot of documentation and examples and a forum with lots of valuable discussions about the ARM based Atmel boards.
Pros: There’s a lot of information on those webpages. A lot to download and a lot to test.
Cons: I would like to see a “getting started” paper on the packaging. Something stating that there’s a Linux distribution loaded and how to do some basic things with it (more on this later).
Installation procedures
The board looked like if it was not loaded with anything out of the box, other than a “blinking user led” application, however, when I had a serial adapter attached to the serial DEBUG port (remember, 3.3V levels), to my amazement, it loads U-Boot (http://www.denx.de/wiki/U-Boot/WebHome) which in turn loads a Linux distribution I had never heard about before, called Poky (http://www.pokylinux.org/).
Now we’re talking, it seems that there’s a lot here to dig around, still not as Arduino compatible as I expected to see, but very interesting nonetheless.
I have found later, while reading the online pages, that the EDBG USB port can also be used as a serial console for the Linux.
I see that the Linux distribution is able to detect the insertion of USB keys and SD/MMC cards, and mount them as part of the file system, which allows for extra storage.
When the USB key is inserted a /dev/sda1 device becomes available, which can be mounted by typing “mount /dev/sda1 /mnt”.
When the SD/MMC card is inserted a /dev/mmcblk0p1 becomes available, which can be mounted by typing “mount /dev/mmcblk0p1 /mnt”.
A SD card inserted to an attached Arduino shield is not detected though.
The board contains a RTC chip so, if a battery (cr2225) is added to the board, the Linux operating system can keep the time running when power is off.
To set the date use the “date mmddHHMMyy” command, and to save it to the RTC use “hwclock –w”.
Pros: Having support for external USB and MMC/SD provides the possibility of using the board as a file-server or media-center, for example.
Cons: The SD card barely goes in, giving the sensation that it may fall off.
Drivers
The USB drivers for accessing the EDBG port of the board are available on the Atmel website, the latest as of now is at https://gallery.atmel.com/Products/Details/c2b640ce-1a06-4dfe-9f36-5f3f60908131. With these drivers installed the board becomes accessible as emulated COM ports.
Once the drivers are installed the board appears as “EDBG Virtual COM Port”. From that moment on, the SAM-BA application can be used to load applications into the board’s flash.
The page at http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted_a5d4_xplained explains how to flash a demo onto the board and it was very easy to follow the steps there. When flashing the demo, though, I had to use the A5-USB-A instead of the EDBG-USB as stated and edit the .BAT file to reflect my detected (bossa serial) port accordingly.
Pros: All works well once installed. No yellow triangles on windows device manager. No need to disable driver signature on Windows 8.1 either.
Cons: Had to dig around a little bit for the drivers.
Ease of use
It is easy to use if you have Linux knowledge. I had the board in mind as a more powerful platform for developing Arduino code and migrating Arduino projects, that I already have working on the Arduino DUE, into a bigger/faster board. After I powered the board up, however, this plan has changed. With a full Linux distribution loaded into it, it looks more like a “Very powerful Raspberry Pi with Arduino sockets”, get the picture? It is the development platform we all dreamed about.
Migrating Arduino code directly to it doesn’t seem to be possible though, as so far I didn’t see any documentation or instruction on how to use Arduino code on this board. This should be possible once someone creates an Arduino framework for it, which does all the translations for GPIO pinout and adds support libraries for the on-board peripherals. Lots of coding needed to make such a thing, and not sure if it is needed once you can have Linux, Android and even Windows CE (it seems) loaded into the board.
One natural next step at this point would be to load a GCC compiler into it (the Linux distribution provided doesn’t have one out of the box, but it gives you a Python interpreter) and write C programs to access the IO pins directly. An example on how to access the device’s IO is on this page: http://www.at91.com/linux4sam/bin/view/Linux4SAM/IioAdcDriver; It shows how to read voltages from the ADCs using the Linux shell, very interesting example.
I couldn’t resist but to make a blink led “hello world” application running from the Linux shell. By connecting one led to port A0 (J7 pin 1) via a 1K resistor and then running the following script:
blink.sh |
---|
#!/bin/sh cd /sys/class/gpio # Goes to the GPIO folder echo 60 > export # Enables the GPIO on port B28 (gpio32+28) cd pioB28 # Enters that pin folder ... echo out > direction # ... and sets it as output while true # Loop forever (until ^C pressed) do echo 1 > value # Turn the LED on sleep 1 echo 0 > value # Turn the LED off sleep 1 done |
A button can be read through the same procedure. The button is connected to the GPIO pin and to +3V3. If the button if pressed “cat value” will return 1, otherwise 0.
A few more code examples are available here: http://www.at91.com/linux4sam/bin/view/Linux4SAM/TipsNTricks
Pros: Lots of examples available.
Cons: Not all of the examples are targeted to this specific board. Steep learning curve.
Arduino or not?
If you have outgrown you Arduino DUE and are looking for a board to accommodate your bigger and more complex project, then look no further, this board will be your option with the expense of losing the Arduino IDE.
It will require coding on a completely different framework, with no Arduino code compatibility, so developing for it is not for the weak of heart.
The IDE proposed by Atmel to work with this board is the IAE Embedded Workbench for ARM. The board is detected but not supported by Atmel Studio 6.2 SP2.
The IAE IDE is not free as Atmel Studio, but has a limited demo version that can be downloaded free of charge from their website here: https://www.iar.com/iar-embedded-workbench/arm/ under “Downloads”.
For the regular Arduino user I wouldn’t recommend this board. It is not compatible with Arduino sketches and developing such compatibility is not a minor task at all.
Using the embedded Linux distribution ad a development environment can also prove challenging, as it doesn’t come out of the box with a package installer like “yum” or “apt-get”. Meaning that to have a GCC compiler there, one would have to re-build the distribution from source, which is thoroughly described here: https://www.yoctoproject.org/documentation/active.
The embedded distribution is Poky version 1.6.1 (Lisa).
Pros: More room for complex and memory hungry embedded projects. Linux embedded from factory.
Cons: Changing the distribution or implementing more packages requires rebuilding the image from scratch and re-flashing.
Performance
The performance of this board in unquestionable. Booting the Linux distribution from Reset to being ready to log-in takes exactly 20 seconds.
/proc/cpuinfo reports: |
---|
processor : 0 model name : ARMv7 Processor rev 1 (v7l) BogoMIPS : 262.96 Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc05 CPU revision : 1
Hardware : Atmel SAMA5 (Device Tree) Revision : 0000 Serial : 0000000000000000 |
/proc/meminfo reports: |
---|
MemTotal: 513976 kB MemFree: 492820 kB |
The system is very responsive and loads the Linux commands in a flash. There’s no perceptible delay between pressing enter and getting the results of most of the commands.
Python also runs very fast. It calculates all the prime numbers between 1 and 10000 in less than a second (.8 sec to be exact) when running “time python primes.py”.
Code for the primes.py script: |
---|
def primes(n): if n==2: return [2] elif n<2: return [] s=range(3,n+1,2) mroot = n ** 0.5 half=(n+1)/2-1 i=0 m=3 while m <= mroot: if s[i]: j=(m*m-3)/2 s[j]=0 while j<half: s[j]=0 j+=m i=i+1 m=2*i+3 return [2]+[x for x in s if x] print primes(10000) |
Pros: FAST!
Cons: none
Advantages
The CPU is fast, the board provides a generous amount of memory and lots of peripherals, all on very standard and easy recognizable form factors.
There’s both a serial console and a JTAG header to allow for debugging of code.
An embedded Linux distribution does make things easier and provides lots of possibilities.
Final considerations
This is definitely a board that I will have fun using and writing software to. It will not be though, at least at the moment, a replacement for my Arduino DUE, as I am still depending on the Arduino IDE and libraries to write my code.
Developing software for this board should not be a problem if using a regular ARM toolchain and Microsoft’s Visual Studio or another IDE like Eclipse, but this type of configuration requires deep knowledge of how to implement such development environment, which is beyond the scope of this review.
For those not interested in Linux, the board allows also loading Android (even booting from the SD without changing the embedded Linux), but I was not able to test it as it requires the PDA’s TM7000 LCD module ( http://www.newark.com/embest/pda-tm7000/hmi-touch-screen-7-800-x-480pixels/dp/49X9923?ost=tm7000 ) which I don't have.
In a nutshell, it is definitely a board to have available when developing high performance ARM based applications.
The on-board video chip with HDMI output is also a good feature to have, as it could allow the board to work independently of a laptop, if Linux could use it as a console. This is another element that I intend to make work and share my findings on the blog later.
It can become a standalone development platform itself by implementing a C compiler onto the embedded image.
Hopefully my review is informative enough to get you through the first steps faster than I did. I will now start building a development image for this board, which I will post to the blog later, so we can write C programs directly into it.
In the meantime, Have fun!
Marcelo.