Flashing a demo for SAMA5D4-EK

(for SAMA5D4 family: SAMA5D41, SAMA5D42, SAMA5D43 and SAMA5D44)

Evaluation Kit

SAMA5D4-EK SAMA5D4-EK with 7" LCD display

Access the console on DBGU serial port

The DBGU serial console can be accessed from two connectors. One is from the RS-232 connector (marked as DBGU J24), another is from mirco-A USB connector that gives access to the on-board serial-USB converter (marked as J22 OB-JLink).

The JP19 and JP20 jumpers are used to select which port is used to access DBGU serial console.

Using RS-232 connector (DBGU J24)

  • Open JP21 to enable DBGU
  • Choose (1-2) for JP19 and JP20 jumper settings
  • Connect a DB9 serial cable to the J24 connector
  • Now open your favorite terminal emulator with appropriate settings

Exceptions:

  • sama5d2 revision A, only to access the ROMCode through serial interface and see the RomBOOT message appearing, configure your serial line to 57600.
    Change it back to 115200 for normal operation.
    All components and demo binaries are now configured to work at 115200 8-N-1.

The usual serial communication parameters are 115200 8-N-1 :

Baud rate 115200
Data 8 bits
Parity None
Stop 1 bit
Flow control None

Using the mirco-A USB connector (J22 OB-JLink)

You can also access the serial console through the on-board serial-USB converter. In fact, the Cortex-M3 chip underneath the Evaluation Kit acts as a serial-to-USB converter and is loaded with a firmware that is able to speak USB-CDC.

  • For Microsoft Windows users: Install the J-Link CDC USB driver. No need to install a driver on any regular Linux distribution.
  • Open JP21 to enable DBGU
  • Open JP10 to enable CDC for OB-JLINK
  • Choose (2-3) for JP19 and JP20 jumper settings
  • Connect the USB cable to the board (J22 OB-JLink)
  • For Microsoft Windows users: identify the USB connection that is established
    JLink CDC UART Port should appear in Device Manager. The COMxx number will be used to configure the terminal emulator.

JLink CDC UART Port

  • For Linux users: identify the USB connection by monitoring the last lines of dmesg command. The /dev/ttyACMx number will be used to configure the terminal emulator.

[  766.492942] usb 2-1.1: new high speed USB device using ehci_hcd and address 8
[  766.585934] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem.
[  766.586033] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
It is the CDC driver which is used and you can see that a /dev/ttyACM0 node has been created.

  • Now open your favorite terminal emulator with appropriate settings

Exceptions:

  • sama5d2 revision A, only to access the ROMCode through serial interface and see the RomBOOT message appearing, configure your serial line to 57600.
    Change it back to 115200 for normal operation.
    All components and demo binaries are now configured to work at 115200 8-N-1.

The usual serial communication parameters are 115200 8-N-1 :

Baud rate 115200
Data 8 bits
Parity None
Stop 1 bit
Flow control None

Flashing the demo

Before flashing the demo, make sure that you have installed the SAM-BA tool on your host computer.

  • Make sure that power switch is on OFF (SW1 position toward the center of the board)
  • connect the power cable to the VCCIN 5V power supply jack
  • connect a USB micro-A cable to the board (USB-A J1)
  • Press and maintain PB3 DIS_BOOT button and switch on the board (SW1 position toward the edge of the board)
    The PB3 DIS_BOOT button prevents booting from Nand or serial Flash by disabling Flash Chip Selects
  • after having powered the board, you can release the PB3 DIS_BOOT button
  • For Microsoft Windows users: verify that the USB connection is well established
    AT91 USB to Serial Converter should appear in Device Manager

AT91 USB to Serial Converter

  • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:

[  766.492942] usb 2-1.1: new high speed USB device using ehci_hcd and address 8
[  766.585934] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem.
[  766.586033] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
It is the CDC driver which is used and you can see that a /dev/ttyACM0 node has been created.

  • For Microsoft Windows users: Launch the .bat file corresponding to the board that you are using
    This script will run SAM-BA with proper parameters.
  • For Linux users: if the /dev/ttyACMx that appears is different from /dev/ttyACM0, edit the .sh file and modify /dev/ttyACMx device number
  • For Linux users: Launch the .sh file corresponding to the board that you are using.
    This script will runs SAM-BA with proper parameters
  • When the logfile.log appears (this will take a few minutes), check that = Done. = is written at the end of the file.
  • Remove the USB cable.
  • Connect a serial link on DBGU and open the terminal emulator program as explained just above
  • Power cycle the board.
  • Look the system booting on the LCD screen or through the serial line

Playing with the demo

Now you should have the Linux demo up'n running on your board !
You can access the Linux console through the serial line as explained just above
Use the root login account without password.

You can have a look at the boot log as a file for the record or have an overview in the image below:

View of system running

 

Application launcher (screen 1) Application launcher (screen 2)

Going forward

If you want to rebuild this demo from sources, go through each component topic and you will have a comprehensive explanation of its role and how to build it.


Topic attachments
I AttachmentSorted ascending Action Size Date Who Comment
Unknown file formatlog atmel-qt5-demo-image-sama5d4ek.log manage 15.4 K 2014-10-02 - 12:36 NicolasFerre  
PNGpng commandline_screen1.png manage 168.7 K 2014-10-01 - 12:34 NicolasFerre  
PNGpng qt5demo_scr1.png manage 142.6 K 2014-10-01 - 12:34 NicolasFerre  
PNGpng qt5demo_scr2.png manage 144.2 K 2014-10-01 - 12:34 NicolasFerre  
r4 - 02 Oct 2014 - 12:38:15 - NicolasFerre
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM