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