1.. zephyr:board:: xiao_rp2040 2 3Overview 4******** 5 6The XIAO RP2040 is an IoT mini development board from Seeed Studio. 7It is equipped with an RP2040 SoC, an on-board WS2812 addressable 8LED, and USB connector. The USB bootloader allows it 9to be flashed without any adapter, in a drag-and-drop manner. 10 11For more details see the `Seeed Studio XIAO RP2040`_ wiki page. 12 13Hardware 14******** 15 16The Seeed Studio XIAO RP2040 is a low-power microcontroller that 17carries the powerful Dual-core RP2040 processor with a flexible 18clock running up to 133 MHz. There is also 264KB of SRAM, and 2MB of 19on-board Flash memory. 20 21There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there 22are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 231 UART interface, 1 SPI interface, 1 SWD Bonding pad interface. 24 25Supported Features 26================== 27 28The ``xiao_rp2040`` board target supports the following hardware 29features: 30 31.. list-table:: 32 :header-rows: 1 33 34 * - Peripheral 35 - Kconfig option 36 - Devicetree compatible 37 * - NVIC 38 - N/A 39 - :dtcompatible:`arm,v6m-nvic` 40 * - UART 41 - :kconfig:option:`CONFIG_SERIAL` 42 - :dtcompatible:`raspberrypi,pico-uart` 43 * - GPIO 44 - :kconfig:option:`CONFIG_GPIO` 45 - :dtcompatible:`raspberrypi,pico-gpio` 46 * - ADC 47 - :kconfig:option:`CONFIG_ADC` 48 - :dtcompatible:`raspberrypi,pico-adc` 49 * - I2C 50 - :kconfig:option:`CONFIG_I2C` 51 - :dtcompatible:`snps,designware-i2c` 52 * - SPI 53 - :kconfig:option:`CONFIG_SPI` 54 - :dtcompatible:`raspberrypi,pico-spi` 55 * - USB Device 56 - :kconfig:option:`CONFIG_USB_DEVICE_STACK` 57 - :dtcompatible:`raspberrypi,pico-usbd` 58 * - HWINFO 59 - :kconfig:option:`CONFIG_HWINFO` 60 - N/A 61 * - Watchdog Timer (WDT) 62 - :kconfig:option:`CONFIG_WATCHDOG` 63 - :dtcompatible:`raspberrypi,pico-watchdog` 64 * - PWM 65 - :kconfig:option:`CONFIG_PWM` 66 - :dtcompatible:`raspberrypi,pico-pwm` 67 * - Flash 68 - :kconfig:option:`CONFIG_FLASH` 69 - :dtcompatible:`raspberrypi,pico-flash-controller` 70 * - Clock controller 71 - :kconfig:option:`CONFIG_CLOCK_CONTROL` 72 - :dtcompatible:`raspberrypi,pico-clock-controller` 73 * - UART (PIO) 74 - :kconfig:option:`CONFIG_SERIAL` 75 - :dtcompatible:`raspberrypi,pico-uart-pio` 76 77Pin Mapping 78=========== 79 80The peripherals of the RP2040 SoC can be routed to various pins on the board. 81The configuration of these routes can be modified through DTS. Please refer to 82the datasheet to see the possible routings for each peripheral. 83 84Default Zephyr Peripheral Mapping: 85---------------------------------- 86 87.. rst-class:: rst-columns 88 89- UART0_TX : P0 90- UART0_RX : P1 91- I2C1_SDA : P6 92- I2C1_SCL : P7 93- SPI0_RX : P4 94- SPI0_SCK : P2 95- SPI0_TX : P3 96 97Connections and IOs 98=================== 99 100The board uses a standard XIAO pinout, the default pin mapping is the following: 101 102.. figure:: img/xiao_rp2040_pinout.webp 103 :align: center 104 :alt: XIAO RP2040 Pinout 105 106 XIAO RP2040 Pinout 107 108Programming and Debugging 109************************* 110 111Flashing 112======== 113 114Using UF2 115--------- 116 117You can flash the Xiao RP2040 with a UF2 file. 118By default, building an app for this board will generate a 119:file:`build/zephyr/zephyr.uf2` file. If the Xiao RP2040 is powered on with 120the ``BOOTSEL`` button pressed, it will appear on the host as a mass storage 121device. The UF2 file should be copied to the device, which will 122flash the Xiao RP2040. 123 124References 125********** 126 127.. target-notes:: 128 129.. _`Seeed Studio XIAO RP2040`: https://wiki.seeedstudio.com/XIAO-RP2040/ 130