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