1.. zephyr:board:: same54_xpro
2
3Overview
4********
5
6The SAM E54 Xplained Pro evaluation kit is ideal for evaluation and
7prototyping with the SAM E54 Cortex®-M4F processor-based
8microcontrollers. The kit includes Atmel’s Embedded Debugger (EDBG),
9which provides a full debug interface without the need for additional
10hardware.
11
12Hardware
13********
14
15- SAME54P20A ARM Cortex-M4F processor at 120 MHz
16- 32.768 kHz crystal oscillator
17- 12 MHz crystal oscillator
18- 1024 KiB flash memory and 256 KiB of RAM
19- One yellow user LED
20- One mechanical user push button
21- One reset button
22- On-board USB based EDBG unit with serial console
23- One QTouch® PTC button
24- 32 MiB QSPI Flash
25- ATECC508 CryptoAuthentication™  device
26- AT24MAC402 serial EEPROM with EUI-48™ MAC address
27- Ethernet
28
29   - RJ45 connector with built-in magnetics
30   - KSZ8091RNA PHY
31   - 10Base-T/100Base-TX IEE 802.3 compliant Ethernet transceiver
32
33- USB interface, host, and device
34- SD/SDIO card connector
35
36Supported Features
37==================
38
39The same54_xpro board configuration supports the following hardware
40features:
41
42+---------------+------------+----------------------------+
43| Interface     | Controller | Driver/Component           |
44+===============+============+============================+
45| ADC           | on-chip    | adc                        |
46+---------------+------------+----------------------------+
47| DAC           | on-chip    | dac                        |
48+---------------+------------+----------------------------+
49| DMAC          | on-chip    | dma                        |
50+---------------+------------+----------------------------+
51| EEPROM        | i2c        | eeprom, EUI-48 MAC Address |
52+---------------+------------+----------------------------+
53| EIC           | on-chip    | interrupt_controller       |
54+---------------+------------+----------------------------+
55| GMAC          | on-chip    | ethernet, mdio             |
56+---------------+------------+----------------------------+
57| GPIO          | on-chip    | gpio                       |
58+---------------+------------+----------------------------+
59| MPU           | on-chip    | arch/arm                   |
60+---------------+------------+----------------------------+
61| NVIC          | on-chip    | arch/arm                   |
62+---------------+------------+----------------------------+
63| NVMCTRL       | on-chip    | flash                      |
64+---------------+------------+----------------------------+
65| PORT          | on-chip    | pinctrl                    |
66+---------------+------------+----------------------------+
67| RTC           | on-chip    | timer                      |
68+---------------+------------+----------------------------+
69| SERCOM I2C    | on-chip    | i2c                        |
70+---------------+------------+----------------------------+
71| SERCOM SPI    | on-chip    | spi                        |
72+---------------+------------+----------------------------+
73| SERCOM USART  | on-chip    | serial, console            |
74+---------------+------------+----------------------------+
75| Serial Number | on-chip    | hwinfo                     |
76+---------------+------------+----------------------------+
77| SYSTICK       | on-chip    | timer                      |
78+---------------+------------+----------------------------+
79| TC            | on-chip    | counter                    |
80+---------------+------------+----------------------------+
81| TCC           | on-chip    | counter, pwm               |
82+---------------+------------+----------------------------+
83| TRNG          | on-chip    | entropy                    |
84+---------------+------------+----------------------------+
85| USB           | on-chip    | usb                        |
86+---------------+------------+----------------------------+
87| WDT           | on-chip    | watchdog                   |
88+---------------+------------+----------------------------+
89
90Other hardware features are not currently supported by Zephyr.
91
92The default configuration can be found in the Kconfig
93:zephyr_file:`boards/atmel/sam0/same54_xpro/same54_xpro_defconfig`.
94
95Pin Mapping
96===========
97
98The SAM E54 Xplained Pro evaluation kit has 4 GPIO controllers. These
99controllers are responsible for pin muxing, input/output, pull-up, etc.
100
101For more details please refer to `SAM D5x/E5x Family Datasheet`_ and the `SAM E54
102Xplained Pro Schematic`_.
103
104.. image:: img/ATSAME54-XPRO-pinout.jpg
105     :align: center
106     :alt: SAME54-XPRO-pinout
107
108Default Zephyr Peripheral Mapping:
109----------------------------------
110- SERCOM2 USART TX : PB24
111- SERCOM2 USART RX : PB25
112- GPIO/PWM LED0    : PC18
113- GPIO SW0         : PB31
114- GMAC RMII REFCK  : PA14
115- GMAC RMII TXEN   : PA17
116- GMAC RMII TXD0   : PA18
117- GMAC RMII TXD1   : PA19
118- GMAC RMII CRSDV  : PC20
119- GMAC RMII RXD0   : PA13
120- GMAC RMII RXD1   : PA12
121- GMAC RMII RXER   : PA15
122- GMAC MDIO MDC    : PC11
123- GMAC MDIO MDIO   : PC12
124- SERCOM4 SPI SCK  : PB26
125- SERCOM4 SPI MOSI : PB27
126- SERCOM4 SPI MISO : PB29
127- SERCOM7 I2C SDA  : PD08
128- SERCOM7 I2C SCL  : PD09
129- USB DP           : PA25
130- USB DM           : PA24
131
132System Clock
133============
134
135The SAME54 MCU is configured to use the 32.768 kHz external oscillator
136with the on-chip PLL generating the 48 MHz system clock.
137
138Serial Port
139===========
140
141The SAME54 MCU has 8 SERCOM based USARTs with one configured as USARTs in
142this BSP. SERCOM2 is the default Zephyr console.
143
144- SERCOM2 115200 8n1 connected to the onboard Atmel Embedded Debugger (EDBG)
145
146PWM
147===
148
149The SAME54 MCU has 5 TCC based PWM units with up to 6 outputs each and a period
150of 24 bits or 16 bits.  If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is
151driven by TCC0 instead of by GPIO.
152
153SPI Port
154========
155
156The SAME54 MCU has 8 SERCOM based SPIs.
157
158I2C Port
159========
160
161The SAME54 MCU has 8 SERCOM based I2Cs. On the SAM E54 Xplained Pro,
162SERCOM7 is connected to a AT24MAC402 EEPROM and a ATECC508A Crypto
163Authentication device.
164
165Programming and Debugging
166*************************
167
168The SAM E54 Xplained Pro comes with a Atmel Embedded Debugger (EDBG).  This
169provides a debug interface to the SAME54 chip and is supported by
170OpenOCD.
171
172Flashing
173========
174
175#. Build the Zephyr kernel and the ``hello_world`` sample application:
176
177   .. zephyr-app-commands::
178      :zephyr-app: samples/hello_world
179      :board: same54_xpro
180      :goals: build
181      :compact:
182
183#. Connect the SAM E54 Xplained Pro to your host computer using the USB debug
184   port.
185
186#. Run your favorite terminal program to listen for output. Under Linux the
187   terminal should be :code:`/dev/ttyACM0`. For example:
188
189   .. code-block:: console
190
191      $ minicom -D /dev/ttyACM0 -o
192
193   The -o option tells minicom not to send the modem initialization
194   string. Connection should be configured as follows:
195
196   - Speed: 115200
197   - Data: 8 bits
198   - Parity: None
199   - Stop bits: 1
200
201#. To flash an image:
202
203   .. zephyr-app-commands::
204      :zephyr-app: samples/hello_world
205      :board: same54_xpro
206      :goals: flash
207      :compact:
208
209   You should see "Hello World! same54_xpro" in your terminal.
210
211References
212**********
213
214.. target-notes::
215
216.. _Microchip website:
217    http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATSAME54-XPRO
218
219.. _SAM D5x/E5x Family Datasheet:
220    http://ww1.microchip.com/downloads/en/DeviceDoc/60001507C.pdf
221
222.. _SAM E54 Xplained Pro Schematic:
223    http://ww1.microchip.com/downloads/en/DeviceDoc/SAME54-Xplained-Pro_Design-Documentation.zip
224