1.. zephyr:board:: xiao_ble 2 3Overview 4******** 5 6The Seeed XIAO BLE (Sense) is a tiny (21 mm x 17.5 mm) Nordic Semiconductor 7nRF52840 ARM Cortex-M4F development board with onboard LEDs, USB port, QSPI 8flash, battery charger, and range of I/O broken out into 14 pins. 9 10Hardware 11******** 12 13- Nordic nRF52840 Cortex-M4F processor at 64MHz 14- 2MB QSPI Flash 15- RGB LED 16- USB Type-C Connector, nRF52840 acting as USB device 17- Battery charger BQ25101 18- Reset button 19- Bluetooth antenna 20- LSM6DS3TR-C 6D IMU (3D accelerometer and 3D gyroscope) (XIAO BLE Sense only) 21- PDM microphone (XIAO BLE Sense only) 22 23Supported Features 24================== 25 26.. zephyr:board-supported-hw:: 27 28Connections and IOs 29=================== 30 31The `XIAO BLE wiki`_ has detailed information about the board including 32`pinouts`_ and the `schematic`_. 33 34LED 35--- 36 37* LED1 (red) = P0.26 38* LED2 (green) = P0.30 39* LED3 (blue) = P0.06 40 41Programming and Debugging 42************************* 43 44The XIAO BLE ships with the `Adafruit nRF52 Bootloader`_ which supports flashing 45using `UF2`_. Doing so allows easy flashing of new images, but does not support 46debugging the device. For debugging please use `External Debugger`_. 47 48UF2 Flashing 49============ 50 51To enter the bootloader, connect the USB port of the XIAO BLE to your host, and 52double tap the reset botton to the left of the USB connector. A mass storage 53device named ``XIAO BLE`` should appear on the host. Using the command line, or 54your file manager copy the :file:`zephyr/zephyr.uf2` file from your build to the base 55of the ``XIAO BLE`` mass storage device. The XIAO BLE will automatically reset 56and launch the newly flashed application. 57 58External Debugger 59================= 60 61In order to support debugging the device, instead of using the bootloader, you 62can use an :ref:`External Debug Probe <debug-probes>`. To flash and debug Zephyr 63applications you need to use `Seeeduino XIAO Expansion Board`_ or solder an SWD 64header onto the back side of the board. 65 66For Segger J-Link debug probes, follow the instructions in the 67:ref:`jlink-external-debug-probe` page to install and configure all the 68necessary software. 69 70Flashing 71-------- 72 73Setup and connect a supported debug probe (JLink, instructions at :ref:`jlink-external-debug-probe` or 74BlackMagic Probe). Then build and flash applications as 75usual (see :ref:`build_an_application` and :ref:`application_run` for more 76details). 77 78Here is an example for the :zephyr:code-sample:`hello_world` application. 79 80First, run your favorite terminal program to listen for output. 81 82.. code-block:: console 83 84 $ minicom -D <tty_device> -b 115200 85 86Replace :code:`<tty_device>` with the port where the board XIAO BLE 87can be found. For example, under Linux, :code:`/dev/ttyACM0`. 88 89Then build and flash the application in the usual way. Just add 90``CONFIG_BOOT_DELAY=5000`` to the configuration, so that USB CDC ACM is 91initialized before any text is printed, as below: 92 93.. tabs:: 94 95 .. group-tab:: XIAO BLE 96 97 .. zephyr-app-commands:: 98 :zephyr-app: samples/hello_world 99 :board: xiao_ble 100 :goals: build flash 101 :gen-args: -DCONFIG_BOOT_DELAY=5000 102 103 .. group-tab:: XIAO BLE Sense 104 105 .. zephyr-app-commands:: 106 :zephyr-app: samples/hello_world 107 :board: xiao_ble/nrf52840/sense 108 :goals: build flash 109 :gen-args: -DCONFIG_BOOT_DELAY=5000 110 111Debugging 112--------- 113 114Refer to the :ref:`jlink-external-debug-probe` page to learn about debugging 115boards with a Segger IC. 116 117Debugging using a BlackMagic Probe is also supported. 118 119Testing the LEDs in the XIAO BLE (Sense) 120**************************************** 121 122There is a sample that allows to test that LEDs on the board are working 123properly with Zephyr: 124 125.. tabs:: 126 127 .. group-tab:: XIAO BLE 128 129 .. zephyr-app-commands:: 130 :zephyr-app: samples/basic/blinky 131 :board: xiao_ble 132 :goals: build flash 133 134 .. group-tab:: XIAO BLE Sense 135 136 .. zephyr-app-commands:: 137 :zephyr-app: samples/basic/blinky 138 :board: xiao_ble/nrf52840/sense 139 :goals: build flash 140 141You can build and flash the examples to make sure Zephyr is running correctly on 142your board. The LED definitions can be found in 143:zephyr_file:`boards/seeed/xiao_ble/xiao_ble_common.dtsi`. 144 145Testing shell over USB in the XIAO BLE (Sense) 146********************************************** 147 148There is a sample that allows to test shell interface over USB CDC ACM interface 149with Zephyr: 150 151.. tabs:: 152 153 .. group-tab:: XIAO BLE 154 155 .. zephyr-app-commands:: 156 :zephyr-app: samples/subsys/shell/shell_module 157 :board: xiao_ble 158 :goals: build flash 159 160 .. group-tab:: XIAO BLE Sense 161 162 .. zephyr-app-commands:: 163 :zephyr-app: samples/subsys/shell/shell_module 164 :board: xiao_ble/nrf52840/sense 165 :goals: build flash 166 167References 168********** 169 170.. target-notes:: 171 172.. _XIAO BLE wiki: https://wiki.seeedstudio.com/XIAO_BLE/ 173.. _pinouts: https://wiki.seeedstudio.com/XIAO_BLE/#hardware-overview 174.. _schematic: https://wiki.seeedstudio.com/XIAO_BLE/#resources 175.. _Seeeduino XIAO Expansion Board: https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ 176.. _Adafruit nRF52 Bootloader: https://github.com/adafruit/Adafruit_nRF52_Bootloader 177.. _UF2: https://github.com/microsoft/uf2 178