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
39.. zephyr:board-supported-hw::
40
41Pin Mapping
42===========
43
44The SAM E54 Xplained Pro evaluation kit has 4 GPIO controllers. These
45controllers are responsible for pin muxing, input/output, pull-up, etc.
46
47For more details please refer to `SAM D5x/E5x Family Datasheet`_ and the `SAM E54
48Xplained Pro Schematic`_.
49
50.. image:: img/ATSAME54-XPRO-pinout.jpg
51     :align: center
52     :alt: SAME54-XPRO-pinout
53
54Default Zephyr Peripheral Mapping:
55----------------------------------
56- SERCOM2 USART TX : PB24
57- SERCOM2 USART RX : PB25
58- GPIO/PWM LED0    : PC18
59- GPIO SW0         : PB31
60- GMAC RMII REFCK  : PA14
61- GMAC RMII TXEN   : PA17
62- GMAC RMII TXD0   : PA18
63- GMAC RMII TXD1   : PA19
64- GMAC RMII CRSDV  : PC20
65- GMAC RMII RXD0   : PA13
66- GMAC RMII RXD1   : PA12
67- GMAC RMII RXER   : PA15
68- GMAC MDIO MDC    : PC11
69- GMAC MDIO MDIO   : PC12
70- SERCOM4 SPI SCK  : PB26
71- SERCOM4 SPI MOSI : PB27
72- SERCOM4 SPI MISO : PB29
73- SERCOM7 I2C SDA  : PD08
74- SERCOM7 I2C SCL  : PD09
75- USB DP           : PA25
76- USB DM           : PA24
77
78System Clock
79============
80
81The SAME54 MCU is configured to use the 32.768 kHz external oscillator
82with the on-chip PLL generating the 48 MHz system clock.
83
84Serial Port
85===========
86
87The SAME54 MCU has 8 SERCOM based USARTs with one configured as USARTs in
88this BSP. SERCOM2 is the default Zephyr console.
89
90- SERCOM2 115200 8n1 connected to the onboard Atmel Embedded Debugger (EDBG)
91
92PWM
93===
94
95The SAME54 MCU has 5 TCC based PWM units with up to 6 outputs each and a period
96of 24 bits or 16 bits.  If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is
97driven by TCC0 instead of by GPIO.
98
99SPI Port
100========
101
102The SAME54 MCU has 8 SERCOM based SPIs.
103
104I2C Port
105========
106
107The SAME54 MCU has 8 SERCOM based I2Cs. On the SAM E54 Xplained Pro,
108SERCOM7 is connected to a AT24MAC402 EEPROM and a ATECC508A Crypto
109Authentication device.
110
111Programming and Debugging
112*************************
113
114The SAM E54 Xplained Pro comes with a Atmel Embedded Debugger (EDBG).  This
115provides a debug interface to the SAME54 chip and is supported by
116OpenOCD.
117
118Flashing
119========
120
121#. Build the Zephyr kernel and the ``hello_world`` sample application:
122
123   .. zephyr-app-commands::
124      :zephyr-app: samples/hello_world
125      :board: same54_xpro
126      :goals: build
127      :compact:
128
129#. Connect the SAM E54 Xplained Pro to your host computer using the USB debug
130   port.
131
132#. Run your favorite terminal program to listen for output. Under Linux the
133   terminal should be :code:`/dev/ttyACM0`. For example:
134
135   .. code-block:: console
136
137      $ minicom -D /dev/ttyACM0 -o
138
139   The -o option tells minicom not to send the modem initialization
140   string. Connection should be configured as follows:
141
142   - Speed: 115200
143   - Data: 8 bits
144   - Parity: None
145   - Stop bits: 1
146
147#. To flash an image:
148
149   .. zephyr-app-commands::
150      :zephyr-app: samples/hello_world
151      :board: same54_xpro
152      :goals: flash
153      :compact:
154
155   You should see "Hello World! same54_xpro" in your terminal.
156
157References
158**********
159
160.. target-notes::
161
162.. _Microchip website:
163    http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATSAME54-XPRO
164
165.. _SAM D5x/E5x Family Datasheet:
166    http://ww1.microchip.com/downloads/en/DeviceDoc/60001507C.pdf
167
168.. _SAM E54 Xplained Pro Schematic:
169    http://ww1.microchip.com/downloads/en/DeviceDoc/SAME54-Xplained-Pro_Design-Documentation.zip
170