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