Flashing a demo for SAMA5D3 Xplained

SAMA5D3 Xplained board

sama5d3_xplained.png

Access the console

You can access the serial console through two ways:

  • the DBGU port with the help of a USB TTL serial cable,
  • the USB CDC device once Linux has started.

DBGU port

  • For Microsoft Windows users: Install the driver of your USB TTL serial cable. FTDI-based ones are the most popular, have a look to this page to get the driver: http://www.ftdichip.com/Drivers/VCP.htm
  • Connect the cable to the board (J23)
  • For Microsoft Windows users: Identify the USB connection that is established, USB Serial Port should appear in Device Manager. The COMxx number will be used to configure the terminal emulator.

sama5d3_xplained_ftdi.png

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

[605576.562740] usb 1-1.1.2: new full-speed USB device number 17 using ehci-pci
[605576.660920] usb 1-1.1.2: New USB device found, idVendor=0403, idProduct=6001
[605576.660933] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[605576.660939] usb 1-1.1.2: Product: TTL232R-3V3
[605576.660944] usb 1-1.1.2: Manufacturer: FTDI
[605576.660958] usb 1-1.1.2: SerialNumber: FTGNVZ04
[605576.663092] ftdi_sio 1-1.1.2:1.0: FTDI USB Serial Device converter detected
[605576.663120] usb 1-1.1.2: Detected FT232RL
[605576.663122] usb 1-1.1.2: Number of endpoints 2
[605576.663124] usb 1-1.1.2: Endpoint 1 MaxPacketSize 64
[605576.663126] usb 1-1.1.2: Endpoint 2 MaxPacketSize 64
[605576.663128] usb 1-1.1.2: Setting MaxPacketSize 64
[605576.663483] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB0

A /dev/ttyUSB0 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

USB device port

Once Linux started, the serial USB gadget module is probed. Then you can get a serial console through the USB device interface.

  • For Windows users: You may have to install a driver for the USB-CDC device that corresponds to the SAMA5D3 Xplained board. The official .inf file needed to configure the USB-CDC driver: https://www.kernel.org/doc/Documentation/usb/linux-cdc-acm.inf
  • For Windows users: Identify the USB connection that is established, Gadget Serial should appear in Device Manager. The COMxx number will be used to configure the terminal emulator.

sama5d3_xplained_usb_console.png

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

[609470.350006] usb 2-1.2: new high-speed USB device number 17 using ehci-pci
[609470.443102] usb 2-1.2: New USB device found, idVendor=0525, idProduct=a4a7
[609470.443107] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[609470.443111] usb 2-1.2: Product: Gadget Serial v2.4
[609470.443113] usb 2-1.2: Manufacturer: Linux 3.10.0-yocto-standard with atmel_usba_udc
[609470.450258] cdc_acm 2-1.2:2.0: This device cannot do calls on its own. It is not a modem.
[609470.450314] cdc_acm 2-1.2:2.0: ttyACM0: USB ACM device

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

  • Open JP5 to disable NAND Flash memory access
  • Press BP2 reset button to boot from on-chip Boot ROM
  • Close JP5 to enable NAND Flash memory access
  • For Microsoft Windows users: verify that the USB connection is well established
    AT91 USB to Serial Converter should appear in Device Manager

sama5d3_xplained_sam-ba.png

  • 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 demo_linux_nandflash.bat file. If you have a PDA 4.3" display module then launch demo_linux_nandflash_pda4.bat. If you have a PDA 7" display module then launch demo_linux_nandflash_pda7.bat
    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 demo_linux_nandflash.sh file. If you have a PDA 4.3" display module then launch demo_linux_nandflash_pda4.sh. If you have a PDA 7" display module then launch demo_linux_nandflash_pda7.sh
    This script will run 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.
  • Press BP2 reset button to boot on NAND Flash memory and launch the demo.

Playing with the demo

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

sama5d3_xplained_demo.png

Going forward

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

-- LudovicDesroches - 2014-02-13

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng sama5d3_xplained.png manage 473.5 K 2014-02-14 - 07:17 LudovicDesroches  
PNGpng sama5d3_xplained_demo.png manage 155.4 K 2014-02-14 - 13:41 LudovicDesroches  
PNGpng sama5d3_xplained_ftdi.png manage 32.0 K 2014-02-18 - 10:33 LudovicDesroches  
PNGpng sama5d3_xplained_sam-ba.png manage 30.9 K 2014-02-19 - 09:49 LudovicDesroches  
PNGpng sama5d3_xplained_usb_console.png manage 31.1 K 2014-02-18 - 15:05 LudovicDesroches  
r17 - 21 May 2015 - 13:45:06 - 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