1 .. _atsamr34_xpro: 2 3SAM R34 Xplained Pro Evaluation Kit 4################################### 5 6Overview 7******** 8 9The SAM R34 Xplained Pro evaluation kit is ideal for evaluation and 10prototyping with the SAM R34 Cortex®-M0+ processor-based 11microcontrollers. The kit includes Atmel’s Embedded Debugger (EDBG), 12which provides a full debug interface without the need for additional 13hardware. 14 15The SAMR34 and SAMR35 parts are produced as a System-in-Package (SiP), 16including both a SAML21 die, and a Semtech SX1276 LoRa radio die. 17 18This board is also referred to as DM320111. 19 20.. image:: img/atsamr34-xpro.jpg 21 :align: center 22 :alt: ATSAMR34-XPRO 23 24Hardware 25******** 26 27- ATSAMR34J18 ARM Cortex-M0+ processor at 48 MHz 28- 32.768 kHz crystal oscillator 29- 256 KiB flash memory, 32 KiB of SRAM, 8KB Low Power SRAM 30- One yellow user LED 31- One mechanical user push button 32- One reset button 33- On-board USB based EDBG unit with serial console 34 35Supported Features 36================== 37 38The atsamr34_xpro board configuration supports the following hardware 39features: 40 41.. list-table:: 42 :header-rows: 1 43 44 * - Interface 45 - Controller 46 - Driver / Component 47 * - NVIC 48 - on-chip 49 - nested vector interrupt controller 50 * - Flash 51 - on-chip 52 - Can be used with LittleFS to store files 53 * - SYSTICK 54 - on-chip 55 - systick 56 * - WDT 57 - on-chip 58 - Watchdog 59 * - GPIO 60 - on-chip 61 - I/O ports 62 * - PWM 63 - on-chip 64 - Pulse Width Modulation 65 * - USART 66 - on-chip 67 - Serial ports 68 * - I2C 69 - on-chip 70 - I2C ports 71 * - SPI 72 - on-chip 73 - Serial Peripheral Interface ports 74 * - TRNG 75 - on-chip 76 - True Random Number Generator 77 78The following hardware features are supported by Zephyr, but not yet fully 79supported by the SOC: 80 81.. list-table:: 82 :header-rows: 1 83 84 * - Interface 85 - Controller 86 - Driver / Component 87 * - LoRa Radio 88 - on-chip 89 - Internal SX1276 LoRa Radio 90 91Other hardware features are not currently supported by Zephyr. 92 93The default configuration can be found in the Kconfig 94``boards/arm/atsamr34_xpro/atsamr34_xpro_defconfig``. 95 96Pin Mapping 97=========== 98 99The SAM R34 Xplained Pro evaluation kit has 3 GPIO controllers. These 100controllers are responsible for pin muxing, input/output, pull-up, etc. 101 102For mode details please refer to `SAM R34 Family Datasheet`_ and the `SAM R34 103Xplained Pro Schematic`_. 104 105.. image:: img/atsamr34-xpro-pinout.jpg 106 :align: center 107 :alt: ATSAMR34-XPRO-pinout 108 109Default Zephyr Peripheral Mapping: 110---------------------------------- 111- SERCOM0 UART TX : PA04 112- SERCOM0 UART RX : PA05 113- SERCOM1 I2C SDA : PA16 114- SERCOM1 I2C SCL : PA17 115- SERCOM4 SPI MISO : PC19 116- SERCOM4 SPI MOSI : PB30 117- SERCOM4 SPI SCK : PC18 118- SERCOM4 GPIO CS : PB31 119- SERCOM5 SPI MISO : PB02 120- SERCOM5 SPI MOSI : PB22 121- SERCOM5 SPI SCK : PB23 122- SERCOM5 GPIO CS0 : PA23 123- SERCOM5 GPIO CS1 : PA14 124- USB DP : PA25 125- USB DM : PA24 126- GPIO/PWM LED0 : PA19 127 128System Clock 129============ 130 131The SAMR34 MCU is configured to use the 32.768 kHz external oscillator 132with the on-chip PLL generating the 48 MHz system clock. 133 134Serial Port 135=========== 136 137The SAMR34 MCU has six SERCOM based USARTs with one configured as USART in 138this BSP. SERCOM0 is the default Zephyr console. 139 140- SERCOM0 115200 8n1 - connected to the onboard Atmel Embedded Debugger (EDBG) 141 142PWM 143=== 144 145The SAMR34 MCU has 3 TCC based PWM units with up to 4 outputs each and a period 146of 24 bits or 16 bits. If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is 147driven by TCC0 instead of by GPIO. 148 149SPI Port 150======== 151 152The SAMR34 MCU has 6 SERCOM based SPIs, with two configured as SPI in this BSP. 153 154- SERCOM4 - connected to the internal LoRa radio 155- SERCOM5 - connected to EXT1 and EXT3 156 157Programming and Debugging 158************************* 159 160The SAM R34 Xplained Pro comes with a Atmel Embedded Debugger (EDBG). This 161provides a debug interface to the SAMR34 chip and is supported by 162OpenOCD. 163 164Flashing 165======== 166 167#. Build the Zephyr kernel and the ``hello_world`` sample application: 168 169 .. zephyr-app-commands:: 170 :zephyr-app: samples/hello_world 171 :board: atsamr34_xpro 172 :goals: build 173 :compact: 174 175#. Connect the SAM R34 Xplained Pro to your host computer using the USB debug 176 port. 177 178#. Run your favorite terminal program to listen for output. Under Linux the 179 terminal should be :code:`/dev/ttyACM0`. For example: 180 181 .. code-block:: console 182 183 $ picocom -b 115200 /dev/ttyACM0 184 185 - Speed: 115200 186 - Data: 8 bits 187 - Parity: None 188 - Stop bits: 1 189 190#. To flash an image: 191 192 .. zephyr-app-commands:: 193 :zephyr-app: samples/hello_world 194 :board: atsamr34_xpro 195 :goals: flash 196 :compact: 197 198 You should see "Hello World! atsamr34_xpro" in your terminal. 199 200References 201********** 202 203.. target-notes:: 204 205.. _Microchip website: 206 https://www.microchip.com/en-us/development-tool/dm320111 207 208.. _SAM L21 Family Datasheet: 209 https://ww1.microchip.com/downloads/en/DeviceDoc/SAM_L21_Family_DataSheet_DS60001477C.pdf 210 211.. _SAM R34 Family Datasheet: 212 https://ww1.microchip.com/downloads/en/DeviceDoc/SAM-R34-R35-Low-Power-LoRa-Sub-GHz-SiP-Data-Sheet-DS70005356C.pdf 213 214.. _SAM R34 Xplained Pro Schematic: 215 https://ww1.microchip.com/downloads/Secure/en/DeviceDoc/SAMR34_SiP_Reference_Design_Package_V3.0.exe 216 217.. _Semtech SX1276: 218 https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1276 219