Home ·

# SAMA5D2 QML Type

Contains chip-specific information about SAMA5D2 device. More...

Import Statement: | import SAMBA.Device.SAMA5D2 3.7
Inherits: | Device
Inherited By: | SAMA5D27SOM1, SAMA5D27SOM1EK, SAMA5D27WLSOM1EK, SAMA5D2ICP, SAMA5D2PTCEK, and SAMA5D2Xplained

- List of all members, including inherited members

## Properties

- config : alias

## Methods

- checkDeviceID()
- commandLineSecureCommand(command, args)
- commandLineSecureCommandHelp(command)
- commandLineSecureCommands()
- initialize()

## Detailed Description

This QML type contains configuration, applets and tools for supporting the SAMA5D2 device.

## Applets

SAM-BA uses small programs called "Applets" to initialize the device or flash external memories. Please see SAMBA::Applet for more information on the applet mechanism.

### Low-Level Applet

This applet is in charge of configuring the device clocks.

It is only needed when using JTAG for communication with the device. When communication using USB or Serial via the SAM-BA Monitor, the clocks are already configured by the ROM-code.

The only supported command is "init".

### External RAM Applet

This applet is in charge of configuring the external RAM.

The Low-Level applet must have been initialized first.

The only supported command is "init".

Note: The external RAM is not needed for correct operation of the other applets. It is only provided as a way to upload and run user programs from external RAM.

### SerialFlash Applet

This applet is used to flash AT25 serial flash memories. It supports all SPI peripherals present on the SAMA5D2 device (see SAMA5D2Config for configuration information).

Supported commands are "init", "read", "write" and "blockErase".

### QuadSPI Flash Applet

This applet is used to flash QuadSPI memories. It supports both QSPI controllers present on the SAMA5D2 (see SAMA5D2Config for configuration information).

Supported commands are "init", "read", "write" and "blockErase".

### NAND Applet

This applet is used to flash NAND memories (see SAMA5D2Config for configuration information).

Supported commands are "init", "read", "write" and "blockErase".

### SDMMC Applet

This applet is used to read/write SD/MMC and e.MMC devices. It supports all SDMMC peripherals present on the SAMA5D2 device (see SAMA5D2Config for configuration information).

Supported commands are "init", "read" and "write".

## Configuration

When creating an instance of the SAMA5D2 type, some configuration can be supplied. The configuration parameters are then used during applet initialization where relevant.

### Preset Board selection

A set of pre-configured values can be selected by instanciating sub-classes of SAMA5D2. The following preset boards are available:

Command-Line Name | QML Name | Board Name
--- | --- | ---
sama5d2-xplained | SAMA5D2Xplained | SAMA5D2 Xplained Ultra

### Custom configuration

Each configuration value can be set individually. Please see SAMA5D2Config for details on the configuration values.

For example, the following QML snipplet configures a device using SPI1 on I/O set 2 and Chip Select 3 at 33Mhz:

    SAMA5D2 {
            config {
                    serialflash {
                            instance: 1
                            ioset: 2
                            chipSelect: 3
                            freq: 33
                    }
            }
    }

## Property Documentation

config : alias

The device configuration used by applets (peripherals, I/O sets, etc.)

See also SAMA5D2Config.

## Method Documentation

checkDeviceID()

Checks that the device is a SAMA5D2.

Reads CHIPID_CIDR register using the current connection and display a warning if its value does not match the expected value for SAMA5D2.

commandLineSecureCommand(command, args)

Handle monitor commands through a SecureConnection

Handle secure commands specific to the secure SAM-BA monitor of SAMA5D2 devices.

commandLineSecureCommandHelp(command)

Show help for monitor commands supported by a SecureConnection

commandLineSecureCommands()

List SAMA5D2 specific commands for its secure SAM-BA monitor

initialize()

Initialize the SAMA5D2 device using the current connection.

This method calls checkDeviceID and then reconfigures the L2-Cache as SRAM for use by the applets.