1.. _sam_e70_xplained: 2 3SAM E70(B) Xplained 4################### 5 6Overview 7******** 8 9The SAM E70 Xplained evaluation kit is a development platform to evaluate the 10Atmel SAM E70 series microcontrollers. The current version allows to use both 11IC variations ATSAME70Q21A(B). 12 13.. image:: img/sam_e70_xplained.jpg 14 :align: center 15 :alt: SAM E70 Xplained 16 17Hardware 18******** 19 20- ATSAME70Q21A(B) ARM Cortex-M7 Processor 21- 12 MHz crystal oscillator 22- 32.768 kHz crystal oscillator (not populated) 23- AT24MAC402 EEPROM 24- IS42S16100E 16 Mb SDRAM 25- SD card connector 26- Ethernet port 27- Micro-AB USB device 28- Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data 29 Gateway Interface (DGI) 30- JTAG interface connector 31- One reset and one user pushbutton 32- One green user LED 33 34Supported Features 35================== 36 37The sam_e70_xplained board configuration supports the following hardware 38features: 39 40+-----------+------------+-------------------------------------+ 41| Interface | Controller | Driver/Component | 42+===========+============+=====================================+ 43| NVIC | on-chip | nested vector interrupt controller | 44+-----------+------------+-------------------------------------+ 45| SYSTICK | on-chip | systick | 46+-----------+------------+-------------------------------------+ 47| UART | on-chip | serial port | 48+-----------+------------+-------------------------------------+ 49| USART | on-chip | serial port | 50+-----------+------------+-------------------------------------+ 51| I2C | on-chip | i2c | 52+-----------+------------+-------------------------------------+ 53| SPI | on-chip | spi | 54+-----------+------------+-------------------------------------+ 55| ETHERNET | on-chip | ethernet | 56+-----------+------------+-------------------------------------+ 57| WATCHDOG | on-chip | watchdog | 58+-----------+------------+-------------------------------------+ 59| GPIO | on-chip | gpio | 60+-----------+------------+-------------------------------------+ 61| ADC | on-chip | ADC via AFEC | 62+-----------+------------+-------------------------------------+ 63| USB | on-chip | USB device | 64+-----------+------------+-------------------------------------+ 65| PWM | on-chip | pwm | 66+-----------+------------+-------------------------------------+ 67| CAN | on-chip | canbus | 68+-----------+------------+-------------------------------------+ 69| HWINFO | on-chip | Unique device serial number | 70+-----------+------------+-------------------------------------+ 71 72Other hardware features are not currently supported by Zephyr. 73 74The default configuration can be found in the Kconfig 75:zephyr_file:`boards/arm/sam_e70_xplained/sam_e70_xplained_defconfig`. 76 77Connections and IOs 78=================== 79 80The `SAME70-XPLD User Guide`_ has detailed information about board connections. 81 82System Clock 83============ 84 85The SAM E70 MCU is configured to use the 12 MHz external oscillator on the board 86with the on-chip PLL to generate a 300 MHz system clock. 87 88Serial Port 89=========== 90 91The ATSAME70Q21 MCU has five UARTs and three USARTs. One of the USARTs is 92configured for the console and is available as a Virtual COM Port via EDBG USB 93chip. 94 95Programming and Debugging 96************************* 97 98Flashing the Zephyr project onto SAM E70 MCU requires the `OpenOCD tool`_. 99Support for Atmel SAM E microcontroller series was added in OpenOCD release 1000.10.0, which was added in Zephyr SDK 0.9.2. 101 102By default a factory new SAM E70 chip will boot SAM-BA boot loader located in 103the ROM, not the flashed image. This is determined by the value of GPNVM1 104(General-Purpose NVM bit 1). The flash procedure will ensure that GPNVM1 is 105set to 1 changing the default behavior to boot from Flash. 106 107If your chip has a security bit GPNVM0 set you will be unable to program flash 108memory or connect to it via a debug interface. The only way to clear GPNVM0 109is to perform a chip erase procedure that will erase all GPNVM bits and the full 110contents of the SAM E70 flash memory: 111 112- With the board power off, set a jumper on the J200 header. 113- Turn the board power on. The jumper can be removed soon after the power is on 114 (flash erasing procedure is started when the erase line is asserted for at 115 least 230ms) 116 117Flashing 118======== 119 120#. Run your favorite terminal program to listen for output. Under Linux the 121 terminal should be :code:`/dev/ttyACM0`. For example: 122 123 .. code-block:: console 124 125 $ minicom -D /dev/ttyACM0 -o 126 127 The -o option tells minicom not to send the modem initialization 128 string. Connection should be configured as follows: 129 130 - Speed: 115200 131 - Data: 8 bits 132 - Parity: None 133 - Stop bits: 1 134 135#. Connect the SAM E70 Xplained board to your host computer using the 136 USB debug port. Then build and flash the :ref:`hello_world` 137 application. 138 139 .. zephyr-app-commands:: 140 :zephyr-app: samples/hello_world 141 :board: sam_e70_xplained 142 :goals: build flash 143 144 You should see "Hello World! sam_e70_xplained" in your terminal. 145 146#. To use the SoC variation B IC, you need type "sam_e70b_xplained". 147 148 .. zephyr-app-commands:: 149 :zephyr-app: samples/hello_world 150 :board: sam_e70b_xplained 151 :goals: build flash 152 153 You should see "Hello World! sam_e70b_xplained" in your terminal. 154 155You can flash the image using an external debug adapter such as J-Link 156or ULINK, connected to the 20-pin JTAG header. Supply the name of the 157debug adapter (e.g., ``jlink``) via an OPENOCD_INTERFACE environment 158variable. OpenOCD will look for the appropriate interface 159configuration in an ``interface/$(OPENOCD_INTERFACE).cfg`` file on its 160internal search path. 161 162Debugging 163========= 164 165You can debug an application in the usual way. Here is an example for the 166:ref:`hello_world` application. 167 168.. zephyr-app-commands:: 169 :zephyr-app: samples/hello_world 170 :board: sam_e70_xplained 171 :maybe-skip-config: 172 :goals: debug 173 174References 175********** 176 177SAM E70 Product Page: 178 http://www.atmel.com/products/microcontrollers/arm/sam-e.aspx 179 180.. _SAME70-XPLD User Guide: 181 http://www.atmel.com/Images/Atmel-44050-Cortex-M7-Microcontroller-SAM-E70-XPLD-Xplained_User-guide.pdf 182 183.. _OpenOCD tool: 184 http://openocd.org/ 185 186.. _SAM-BA: 187 http://www.atmel.com/tools/ATMELSAM-BAIN-SYSTEMPROGRAMMER.aspx 188