|
| 1 | +.. zephyr:board:: rp2040_geek |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | + |
| 6 | +The `Waveshare RP2040-GEEK Development Board`_ is based on the RP2040 microcontroller from |
| 7 | +Raspberry Pi Ltd. It has an USB A connector, a color screen, a microSD card slot and several |
| 8 | +expansion connectors. |
| 9 | + |
| 10 | + |
| 11 | +Hardware |
| 12 | +******** |
| 13 | + |
| 14 | +- Microcontroller Raspberry Pi RP2040, with a max frequency of 133 MHz |
| 15 | +- Dual ARM Cortex M0+ cores |
| 16 | +- 264 kByte SRAM |
| 17 | +- 4 Mbyte QSPI flash |
| 18 | +- USB type A connector |
| 19 | +- BOOT button |
| 20 | +- 135x240 pixels 1.14 inch color LCD screen |
| 21 | +- microSD card slot |
| 22 | +- 4-pin I2C connector (Quiic / Stemma QT compatible) |
| 23 | +- 3-pin UART connector |
| 24 | +- 3-pin GPIO connector |
| 25 | + |
| 26 | + |
| 27 | +Default Zephyr Peripheral Mapping |
| 28 | +================================= |
| 29 | + |
| 30 | +.. rst-class:: rst-columns |
| 31 | + |
| 32 | + - Connector "UART" pin GP4, UART1 TX : GPIO4 |
| 33 | + - Connector "UART" pin GP5, UART1 RX : GPIO5 |
| 34 | + - Connector "DEBUG" pin GP2 : GPIO2 |
| 35 | + - Connector "DEBUG" pin GP3 : GPIO3 |
| 36 | + - Connector "I2C/ADC" pin GP28, I2C0 SDA : GPIO28 |
| 37 | + - Connector "I2C/ADC" pin GP29, I2C0 SCL : GPIO29 |
| 38 | + - microSD SCK, SPI0 SCK : GPIO18 |
| 39 | + - microSD CMD, SPI0 MOSI : GPIO19 |
| 40 | + - microSD DO, SPI0 MISO : GPIO20 |
| 41 | + - microSD D1 : GPIO21 |
| 42 | + - microSD D2 : GPIO22 |
| 43 | + - microSD D3 (CS) : GPIO23 |
| 44 | + - LCD DC (data/command): GPIO8 |
| 45 | + - LCD SPI1 CS : GPIO9 |
| 46 | + - LCD SPI1 SCK : GPIO10 |
| 47 | + - LCD SPI1 MOSI : GPIO11 |
| 48 | + - LCD RST (reset) : GPIO12 |
| 49 | + - LCD BL (backlight): GPIO25 |
| 50 | + |
| 51 | +This board is intended to be used with a host computer via the USB A connector, why this board |
| 52 | +by default uses USB for terminal output. |
| 53 | + |
| 54 | +See also `Waveshare P2040-GEEK wiki`_ and `schematic`_. |
| 55 | + |
| 56 | + |
| 57 | +Supported Features |
| 58 | +================== |
| 59 | + |
| 60 | +.. zephyr:board-supported-hw:: |
| 61 | +
|
| 62 | +
|
| 63 | +Programming and Debugging |
| 64 | +************************* |
| 65 | + |
| 66 | +.. zephyr:board-supported-runners:: |
| 67 | +
|
| 68 | +The board does not expose the SWDIO and SWCLK pins, so programming must be done via the |
| 69 | +USB port. Press and hold the BOOT button when connecting the RP2040-GEEK to your host computer, |
| 70 | +and the device will appear as a USB mass storage unit. Building your application will result in |
| 71 | +a :file:`build/zephyr/zephyr.uf2` file. Drag and drop the file to the USB mass storage |
| 72 | +unit, and the RP2040-GEEK will be reprogrammed. |
| 73 | + |
| 74 | +For more details on programming RP2040-based boards, see :zephyr:board:`rpi_pico` and especially |
| 75 | +:ref:`rpi_pico_programming_and_debugging`. |
| 76 | + |
| 77 | + |
| 78 | +Flashing |
| 79 | +======== |
| 80 | + |
| 81 | +To run the :zephyr:code-sample:`dining-philosophers` sample to verify output on the USB console: |
| 82 | + |
| 83 | +.. zephyr-app-commands:: |
| 84 | + :zephyr-app: samples/philosophers/ |
| 85 | + :board: rp2040_geek |
| 86 | + :goals: build flash |
| 87 | + |
| 88 | +Try also the :zephyr:code-sample:`fs`, :zephyr:code-sample:`display`, :zephyr:code-sample:`lvgl` |
| 89 | +and :zephyr:code-sample:`uart-passthrough` samples. |
| 90 | + |
| 91 | +Samples where text is printed only just at startup, for example :zephyr:code-sample:`hello_world`, |
| 92 | +are difficult to use as the text is already printed once you connect to the newly created |
| 93 | +USB console endpoint. |
| 94 | + |
| 95 | +It is easy to connect a sensor shield via the I2C connector, for example |
| 96 | +the ``adafruit_lis3dh`` shield. Run the :zephyr:code-sample:`accel_polling` sample: |
| 97 | + |
| 98 | +.. zephyr-app-commands:: |
| 99 | + :zephyr-app: samples/sensor/accel_polling/ |
| 100 | + :board: rp2040_geek |
| 101 | + :shield: adafruit_lis3dh |
| 102 | + :goals: build flash |
| 103 | + |
| 104 | +To use the GPIO pins on the "DEBUG" connector: |
| 105 | + |
| 106 | +.. zephyr-app-commands:: |
| 107 | + :zephyr-app: samples/sensor/sensor_shell |
| 108 | + :board: rp2040_geek |
| 109 | + :gen-args: -DCONFIG_GPIO=y -DCONFIG_GPIO_SHELL=y |
| 110 | + :goals: build flash |
| 111 | + |
| 112 | +and then in the device console: |
| 113 | + |
| 114 | +.. code-block:: console |
| 115 | +
|
| 116 | + uart:~$ gpio conf gpio0 2 o |
| 117 | + uart:~$ gpio set gpio0 2 1 |
| 118 | +
|
| 119 | +
|
| 120 | +References |
| 121 | +********** |
| 122 | + |
| 123 | +.. target-notes:: |
| 124 | + |
| 125 | +.. _Waveshare RP2040-GEEK Development Board: |
| 126 | + https://www.waveshare.com/rp2040-geek.htm |
| 127 | + |
| 128 | +.. _Waveshare P2040-GEEK wiki: |
| 129 | + https://www.waveshare.com/wiki/RP2040-GEEK |
| 130 | + |
| 131 | +.. _schematic: |
| 132 | + https://files.waveshare.com/wiki/RP2040-GEEK/RP2040-GEEK-Schematic.pdf |
0 commit comments