Name

Configuration — Platform-specific Configuration Options

Overview

The SAMX70-EK motherboard platform HAL package is loaded automatically when eCos is configured for a suitable target, e.g. samv71_ek or same70_ek. It should never be necessary to load this package explicitly. Unloading the package should only happen as a side effect of switching target hardware.

Startup

The SAMX70_EK board platform HAL package supports four separate startup types:

JTAG
This is the default startup type. It is used to build applications that are loaded via a JTAG interface into the on-chip SRAM. The application will be self-contained with no dependencies on services provided by other software. The program expects to be loaded from 0x20400000 and entered at 0x20400408. eCos startup code will perform all necessary hardware initialization.
JTAGEXT
This startup type is used to build applications that are loaded via a JTAG interface, or a boot loader, into the off-chip SDRAM. The application will be self-contained with no dependencies on services provided by other software. The program expects to be loaded from 0x70000000 and entered at 0x70000008. eCos startup code will perform all necessary hardware initialization other than the SDRAM controller, since that is initialised via the H/W (JTAG/SWD) debugger or a flash based boot loader.
ROM
This startup type can be used for finished applications which will be programmed into internal flash at location 0x00400000 using the on-chip SRAM as the main application RAM area. Data and BSS will be put into SRAM starting from 0x20400000. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization. To make ROM code run from reset, it is necessary to set the GPNVM1 bit to 1; this can be done via the Atmel SAM-BA utility.
ROMEXT
This startup type can be used for finished applications which will be programmed into internal flash at location 0x00400000 using the off-chip SDRAM as the main application RAM area. Data and BSS will be put into SDRAM starting from 0x70000000. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization. To make ROM code run from reset, it is necessary to set the GPNVM1 bit to 1; this can be done via the Atmel SAM-BA utility.

The naming of the STARTUP types is for backwards compability with earlier releases that did not support the off-chip SDRAM.

UART Serial Driver

The SAMX70_EK board uses the SAM's internal UART serial support. The HAL diagnostic interface, used for both polled diagnostic output and GDB stub communication, is only expected to be available to be used on the UART0 (DBGU) port. This is because only UART0 is actually routed to an external RS232 connector.

As well as the polled HAL diagnostic interface, there is also a CYGPKG_IO_SERIAL_ARM_AT91 package which contains all the code necessary to support interrupt-driven operation with greater functionality.

It is not recommended to use the interrupt-driven serial driver with a port at the same time as using that port for HAL diagnostic I/O.

This driver is not active until the CYGPKG_IO_SERIAL_DEVICES configuration option within the generic serial driver support package CYGPKG_IO_SERIAL is enabled in the configuration. By default this will only enable support in the driver for the UART0 port (the same as the HAL diagnostic interface), but the default configuration can be modified to enable support for other serial ports.

SPI Driver

An SPI bus driver is available in the package "Atmel AT91 SPI device driver" (CYGPKG_DEVS_SPI_ARM_AT91).

The only SPI device instantiated by default is for an external AT25DF321A NOR flash used for testing.

Consult the generic SPI driver API documentation in the eCosPro Reference Manual for further details on SPI support in eCosPro, along with the configuration options in the AT91 SPI device driver.

I²C Driver

Support for SAM I²C (TWI) busses is provided by the "Atmel TWI (I2C) device driver" package (CYGPKG_DEVS_I2C_ATMEL_TWI). The SAM variant HAL causes the two buses to be instantiated. These have been tested using external I²C devices.

CAN Driver

The SAMX70-EK has dual MCAN devices for CAN and CAN-FD support. Device support is via the Atmel MCAN CAN Driver (CYGPKG_DEVS_CAN_MCAN) package.

The SAMV71XULT board has an on-board CAN transceiver which is connected to MCAN1 and to CANH and CANL pins on the board. The SAME70XPLD board has no on-board transceiver and the CANTX and CANRX pins for both MCAN0 and MCAN1 are available on the Arduino connectors.

Consult the generic Chapter 90, CAN Support documentation for further details on use of the CAN API, CAN configuration and device drivers.

Flash Driver

The on-chip Flash may be programmed and managed using the Flash driver located in the "FLASH memory support for Atmel AT91 IAP" (CYGPKG_DEVS_FLASH_AT91IAP) package. This driver is enabled automatically if the generic "Flash device drivers" (CYGPKG_IO_FLASH) package is included in the eCos configuration. The driver will configure itself automatically for the size and parameters of the specific SAM variant present on the SAMX70-EK board.

Consult the driver and Part XVIII, “NOR Flash Support” documentation for more details.

ADC Driver

ADC support is provided by the Atmel AFEC ADC Driver (CYGPKG_DEVS_ADC_ATMEL_AFEC) package. Some ADC lines are available on the EXT1 and EXT2 headers.