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