Sama5D2 PTC EK

Last modified by Microchip on 2025/09/12 05:44

SoC Features

The SAMA5D2 series is a high-performance, ultra-low-power ARM Cortex-A5 processor based MPU. The Cortex A5 processor runs up to 500MHz and features the ARM NEON SIMD engine a 128kB L2 cache and a floating point unit. It supports multiple memories, including latest-generation technologies such as DDR3, LPDDR3, and QSPI Flash. It integrates powerful peripherals for connectivity (EMAC, USB, dual CAN, up to 10 UARTs, etc.) and user interface applications (TFT LCD controller, embedded capacitive touch controller, class D amplifier, audio PLL, CMOS sensor interface, etc.). The devices offer advanced security functions to protect customer code and secure external data transfers. These include ARM TrustZone, tamper detection, secure data storage, hardware encryption engines including private keys, on-the-fly decryption of code stored in external DDR or QSPI memory and a secure boot loader.

sama5d2.png

Kit Information

Kit Overview

SAMA5D2 PTC EK

Access the console

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.Boards.__notes._board-sections-test.common-serial.WebHome]]. Click on this message for details.

Access the console on JLINK micro-A USB connector (J9)

The serial console can be accessed from the micro-A USB connector that gives access to the on-board serial-to-USB converter (marked as J9 JLINK). In fact, the ATSAM3U chip on the Evaluation Kit acts as a serial-to-USB converter and is loaded with a firmware that is able to talk USB-CDC protocol.

  • 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 (J9 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:
      usb 1-1.2.2.4: new high-speed USB device number 33 using ehci-pci
      usb 1-1.2.2.4: config 1 interface 1 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
      usb 1-1.2.2.4: config 1 interface 1 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64
      usb 1-1.2.2.4: New USB device found, idVendor=1366, idProduct=0105
      usb 1-1.2.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      usb 1-1.2.2.4: Product: J-Link
      usb 1-1.2.2.4: Manufacturer: SEGGER
      usb 1-1.2.2.4: SerialNumber: 000483029109
      cdc_acm 1-1.2.2.4:1.0: ttyACM0: USB ACM device
  • Now open your favorite terminal emulator with appropriate settings

Demo

Demo archives

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.demo-archive.archive2020_04.sama5d2ptcek.WebHome]]. Click on this message for details.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.faq.demo-sd.WebHome]]. Click on this message for details.

Flash the demo

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.flash-demo-rootfs-nand.WebHome]]. Click on this message for details.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.connect-usb.sama5d2ptcek.WebHome]]. Click on this message for details.

Run script to flash the demo

  • download the demo package for the board. They are marked as "Media type: NAND Flash " in the table above
  • extract the demo package
  • run your usual terminal emulator and enter the demo directory
  • make sure that the sam-ba application is in your Operating System path so that you can reach it from your demo package directory
  • for Microsoft Windows users: Launch the demo_linux_nandflash.bat file
  • for Linux users: Launch the demo_linux_nandflash.sh file
  • this script runs SAM-BA 3 and the associated QML sam-ba script (demo_linux_nandflash_usb.qml) with proper parameters
  • when you reach the end of the flashing process (this will take a few minutes), the following line is written:
    -I- === Done. === 
  • connect a serial link on DBGU and open the terminal emulator program as explained just above
  • power cycle the board
  • monitor the system while it's booting on the LCD screen or through the serial line

Play with the PTC demos

For more details regarding the PTC demos, please see Using PTC.

Build From source code

Setup ARM Cross Compiler

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.cross-compiler.13-2-rel1.WebHome]]. Click on this message for details.

Build AT91Bootstrap from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.at91bootstrap.build-at91bootstrap-all-top.WebHome]]. Click on this message for details.

Assuming you are at the AT91Bootstrap root directory, you will find a configs folder which contains several default configuration files:

sama5d2_ptc_eknf_uboot_defconfig
sama5d2_ptc_eksd_uboot_defconfig
Information

Tips: nf means to read nandflash, sd means to read mmc card.

You can configure AT91Bootstrap to load U-Boot binary from SD Card by doing:

$ make mrproper
$ make sama5d2_ptc_eksd_uboot_defconfig

If the configuring process is successful, the .config file can be found at AT91Bootstrap root directory.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.at91bootstrap.build-at91bootstrap-all-bottom.WebHome]]. Click on this message for details.

Build U-Boot from sources

Getting U-Boot sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.u-boot.uboot-get-source.WebHome]]. Click on this message for details.

Cross-compiling U-Boot

Before compiling the U-Boot, you need setup cross compile toolchain in the Setup ARM Cross Compiler above.

Warning

Latest versions of U-boot (2018.07 and newer) have a minimum requirement of 6.0 version of the GCC toolchain. We always recommend to use the latest versions.

Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the Configuration chapter in U-Boot reference manual.

Information

Go to the configs/ to find the exact target when invoking make.

The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.

   # To put environment variables in nand flash:
  sama5d2_ptc_ek_nandflash_defconfig
  # To put environment variables in SD/MMC card:
  sama5d2_ptc_ek_mmc_defconfig

Here are the building steps for the SAMA5D2-PTC-EK board:

# You can change the config according to your needs.
make sama5d2_ptc_ek_mmc_defconfig
make

The result of these operations is a fresh U-Boot binary called u-boot.bin corresponding to the binary ELF file u-boot.

  • u-boot.bin is the file you should store on the board
  • u-boot is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.

Build Kernel from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.components.linuxkernel.linuxkernel-6-12.build-linux-top.WebHome]]. Click on this message for details.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.components.linuxkernel.linuxkernel-6-12.build-linux-bottom.WebHome]]. Click on this message for details.

Build Yocto Project rootfs from sources

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.faq.oebuild.oe-build.WebHome]]. Click on this message for details.

Using SAM-BA to flash components to board

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.demo-nand-map.WebHome]]. Click on this message for details.

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.install-samba.WebHome]]. Click on this message for details.

Launch SAM-BA tools

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.launch-master-page.WebHome]]. Click on this message for details.

Configure NAND ECC

Using default PMECC parameters

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.ecc-config.sama5d2ptcek.WebHome]]. Click on this message for details.

Programming components into NAND

Program AT91Bootstrap binary

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.flash-nand-at91bootstrap.sama5d2ptcek.WebHome]]. Click on this message for details.

Program U-Boot binary

Failed to execute the [display] macro. Cause: [Current user [null] doesn't have view rights on document [xwiki:Development.applications.linux4sam.subsections.sam-ba3.flash-nand-uboot.sama5d2ptcek.WebHome]]. Click on this message for details.

Recent FAQ