Flashing a demo for SAMA5D3x family
(for SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35 and SAMA5D36)
You can 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.
- Connect the USB cable to the board (J14 – JTAG and USB Serial DBGU)
- 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.
- 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 |
|
|
|
Before flashing the demo, make sure that you have installed the
SAM-BA tool on your host computer.
- Connect a USB cable to the board (J20)
- JP9 must open so that (BMS == 1) to boot from on-chip Boot ROM
- Press and maintain PB4 BS_BOOT button and power up the board
PB4 CS_BOOT button prevents booting from Nand or serial Flash by disabling Flash Chip Selects
- after having powered the board, you can release the PB4 BS_BOOT button
- For Microsoft Windows users: verify that the USB connection is well established
AT91 USB to Serial Converter
should appear in Device Manager
- 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 USB CDC / DBGU connector 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
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.
There are things that you must know about the Home Automation Demo, please visit the
Home Automation Tips and Tricks page.
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.