|
| 1 | +.. _adafruit_kb2040: |
| 2 | + |
| 3 | +Adafruit KB2040 |
| 4 | +############### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The Adafruit KB2040 is a small, low-cost, versatile board from |
| 10 | +Adafruit. It is equipped with an RP2040 SoC, an on-board RGB Neopixel, |
| 11 | +a USB connector, and a STEMMA QT connector. The USB bootloader allows |
| 12 | +it to be flashed without any adapter, in a drag-and-drop manner. |
| 13 | + |
| 14 | +Hardware |
| 15 | +******** |
| 16 | +- Dual core Arm Cortex-M0+ processor running up to 133MHz |
| 17 | +- 264KB on-chip SRAM |
| 18 | +- 8MB on-board QSPI flash with XIP capabilities |
| 19 | +- 18 GPIO pins |
| 20 | +- 4 Analog inputs |
| 21 | +- 1 UART peripherals |
| 22 | +- 1 SPI controllers |
| 23 | +- 2 I2C controllers (one via STEMMA QT connector) |
| 24 | +- 16 PWM channels |
| 25 | +- USB 1.1 controller (host/device) |
| 26 | +- 8 Programmable I/O (PIO) for custom peripherals |
| 27 | +- On-board RGB LED |
| 28 | +- 1 Watchdog timer peripheral |
| 29 | + |
| 30 | + |
| 31 | +.. figure:: img/kb2040.jpg |
| 32 | + :align: center |
| 33 | + :alt: Adafruit KB2040 |
| 34 | + |
| 35 | + Adafruit KB2040 (Image courtesy of Adafruit) |
| 36 | + |
| 37 | +Supported Features |
| 38 | +================== |
| 39 | + |
| 40 | +The adafruit_kb2040 board configuration supports the following |
| 41 | +hardware features: |
| 42 | + |
| 43 | +.. list-table:: |
| 44 | + :header-rows: 1 |
| 45 | + |
| 46 | + * - Peripheral |
| 47 | + - Kconfig option |
| 48 | + - Devicetree compatible |
| 49 | + * - NVIC |
| 50 | + - N/A |
| 51 | + - :dtcompatible:`arm,v6m-nvic` |
| 52 | + * - UART |
| 53 | + - :kconfig:option:`CONFIG_SERIAL` |
| 54 | + - :dtcompatible:`raspberrypi,pico-uart` |
| 55 | + * - GPIO |
| 56 | + - :kconfig:option:`CONFIG_GPIO` |
| 57 | + - :dtcompatible:`raspberrypi,pico-gpio` |
| 58 | + * - ADC |
| 59 | + - :kconfig:option:`CONFIG_ADC` |
| 60 | + - :dtcompatible:`raspberrypi,pico-adc` |
| 61 | + * - I2C |
| 62 | + - :kconfig:option:`CONFIG_I2C` |
| 63 | + - :dtcompatible:`snps,designware-i2c` |
| 64 | + * - SPI |
| 65 | + - :kconfig:option:`CONFIG_SPI` |
| 66 | + - :dtcompatible:`raspberrypi,pico-spi` |
| 67 | + * - USB Device |
| 68 | + - :kconfig:option:`CONFIG_USB_DEVICE_STACK` |
| 69 | + - :dtcompatible:`raspberrypi,pico-usbd` |
| 70 | + * - HWINFO |
| 71 | + - :kconfig:option:`CONFIG_HWINFO` |
| 72 | + - N/A |
| 73 | + * - Watchdog Timer (WDT) |
| 74 | + - :kconfig:option:`CONFIG_WATCHDOG` |
| 75 | + - :dtcompatible:`raspberrypi,pico-watchdog` |
| 76 | + * - PWM |
| 77 | + - :kconfig:option:`CONFIG_PWM` |
| 78 | + - :dtcompatible:`raspberrypi,pico-pwm` |
| 79 | + |
| 80 | +Pin Mapping |
| 81 | +=========== |
| 82 | + |
| 83 | +The peripherals of the RP2040 SoC can be routed to various pins on the board. |
| 84 | +The configuration of these routes can be modified through DTS. Please refer to |
| 85 | +the datasheet to see the possible routings for each peripheral. |
| 86 | + |
| 87 | +Default Zephyr Peripheral Mapping: |
| 88 | +---------------------------------- |
| 89 | + |
| 90 | +.. rst-class:: rst-columns |
| 91 | + |
| 92 | +- UART0_TX : P0 |
| 93 | +- UART0_RX : P1 |
| 94 | +- I2C1_SDA : P2 |
| 95 | +- I2C1_SCL : P3 |
| 96 | +- SPI0_RX : P20 |
| 97 | +- SPI0_SCK : P18 |
| 98 | +- SPI0_TX : P19 |
| 99 | + |
| 100 | +Programming and Debugging |
| 101 | +************************* |
| 102 | + |
| 103 | +Flashing |
| 104 | +======== |
| 105 | + |
| 106 | +Using UF2 |
| 107 | +--------- |
| 108 | + |
| 109 | +Since it doesn't expose the SWD pins, you must flash the Adafruit KB2040 with |
| 110 | +a UF2 file. By default, building an app for this board will generate a |
| 111 | +`build/zephyr/zephyr.uf2` file. If the KB2040 is powered on with the `BOOTSEL` |
| 112 | +button pressed, it will appear on the host as a mass storage device. The |
| 113 | +UF2 file should be drag-and-dropped to the device, which will flash the KB2040. |
| 114 | + |
| 115 | +.. target-notes:: |
| 116 | + |
| 117 | +.. _Getting Started with Raspberry Pi Pico: |
| 118 | + https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf |
| 119 | + |
| 120 | +.. _Primary Guide\: Adafruit KB2040: |
| 121 | + https://learn.adafruit.com/adafruit-kb2040 |
0 commit comments