|
| 1 | +.. zephyr:board:: esp32s3_matrix |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | + |
| 6 | +The ESP32-S3-Matrix is an ESP32S3 development board from Waveshare with a 8x8 |
| 7 | +RGB LED matrix. This board integrates complete Wi-Fi and Bluetooth Low Energy |
| 8 | +functions, an accelerometer and gyroscope, a battery charger and GPIO extension |
| 9 | +port. |
| 10 | + |
| 11 | +Hardware |
| 12 | +******** |
| 13 | + |
| 14 | +ESP32-S3 is a low-power MCU-based system on a chip (SoC) with integrated 2.4 GHz Wi-Fi |
| 15 | +and Bluetooth® Low Energy (Bluetooth LE). It consists of high-performance dual-core microprocessor |
| 16 | +(Xtensa® 32-bit LX7), a low power coprocessor, a Wi-Fi baseband, a Bluetooth LE baseband, |
| 17 | +RF module, and numerous peripherals. |
| 18 | + |
| 19 | +ESP32-S3-Matrix includes the following features: |
| 20 | + |
| 21 | +- Dual core 32-bit Xtensa Microprocessor (Tensilica LX7), running up to 240MHz |
| 22 | +- Additional vector instructions support for AI acceleration |
| 23 | +- 512KB of SRAM |
| 24 | +- 2MB of PSRAM |
| 25 | +- 4MB of FLASH |
| 26 | +- Wi-Fi 802.11b/g/n |
| 27 | +- Bluetooth LE 5.0 with long-range support and up to 2Mbps data rate |
| 28 | +- 8x8 RGB LED matrix |
| 29 | +- Accelerometer/gyroscope |
| 30 | + |
| 31 | +Digital interfaces: |
| 32 | + |
| 33 | +- 15 programmable GPIOs |
| 34 | + |
| 35 | +Low Power: |
| 36 | + |
| 37 | +- Power Management Unit with five power modes |
| 38 | +- Ultra-Low-Power (ULP) coprocessors: ULP-RISC-V and ULP-FSM |
| 39 | + |
| 40 | +Security: |
| 41 | + |
| 42 | +- Secure boot |
| 43 | +- Flash encryption |
| 44 | +- 4-Kbit OTP, up to 1792 bits for users |
| 45 | +- Cryptographic hardware acceleration: (AES-128/256, Hash, RSA, RNG, HMAC, Digital signature) |
| 46 | + |
| 47 | +Asymmetric Multiprocessing (AMP) |
| 48 | +******************************** |
| 49 | + |
| 50 | +ESP32-S3 allows 2 different applications to be executed in ESP32-S3 SoC. Due to its dual-core |
| 51 | +architecture, each core can be enabled to execute customized tasks in stand-alone mode |
| 52 | +and/or exchanging data over OpenAMP framework. See :zephyr:code-sample-category:`ipc` folder as code reference. |
| 53 | + |
| 54 | +For more information, check the datasheet at `ESP32-S3 Datasheet`_ or the technical reference |
| 55 | +manual at `ESP32-S3 Technical Reference Manual`_. |
| 56 | + |
| 57 | +Supported Features |
| 58 | +================== |
| 59 | + |
| 60 | +.. zephyr:board-supported-hw:: |
| 61 | +
|
| 62 | +Prerequisites |
| 63 | +------------- |
| 64 | + |
| 65 | +Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command |
| 66 | +below to retrieve those files. |
| 67 | + |
| 68 | +.. code-block:: console |
| 69 | +
|
| 70 | + west blobs fetch hal_espressif |
| 71 | +
|
| 72 | +.. note:: |
| 73 | + |
| 74 | + It is recommended running the command above after :file:`west update`. |
| 75 | + |
| 76 | +Building & Flashing |
| 77 | +******************* |
| 78 | + |
| 79 | +.. zephyr:board-supported-runners:: |
| 80 | +
|
| 81 | +Simple boot |
| 82 | +=========== |
| 83 | + |
| 84 | +The board could be loaded using the single binary image, without 2nd stage bootloader. |
| 85 | +It is the default option when building the application without additional configuration. |
| 86 | + |
| 87 | +.. note:: |
| 88 | + |
| 89 | + Simple boot does not provide any security features nor OTA updates. |
| 90 | + |
| 91 | +MCUboot bootloader |
| 92 | +================== |
| 93 | + |
| 94 | +User may choose to use MCUboot bootloader instead. In that case the bootloader |
| 95 | +must be built (and flashed) at least once. |
| 96 | + |
| 97 | +There are two options to be used when building an application: |
| 98 | + |
| 99 | +1. Sysbuild |
| 100 | +2. Manual build |
| 101 | + |
| 102 | +.. note:: |
| 103 | + |
| 104 | + User can select the MCUboot bootloader by adding the following line |
| 105 | + to the board default configuration file. |
| 106 | + |
| 107 | + .. code:: cfg |
| 108 | +
|
| 109 | + CONFIG_BOOTLOADER_MCUBOOT=y |
| 110 | +
|
| 111 | +Sysbuild |
| 112 | +======== |
| 113 | + |
| 114 | +The sysbuild makes possible to build and flash all necessary images needed to |
| 115 | +bootstrap the board with the ESP32-S3 SoC. |
| 116 | + |
| 117 | +To build the sample application using sysbuild use the command: |
| 118 | + |
| 119 | +.. zephyr-app-commands:: |
| 120 | + :tool: west |
| 121 | + :zephyr-app: samples/hello_world |
| 122 | + :board: esp32s3_matrix/esp32s3/procpu |
| 123 | + :goals: build |
| 124 | + :west-args: --sysbuild |
| 125 | + :compact: |
| 126 | + |
| 127 | +By default, the ESP32 sysbuild creates bootloader (MCUboot) and application |
| 128 | +images. But it can be configured to create other kind of images. |
| 129 | + |
| 130 | +Build directory structure created by sysbuild is different from traditional |
| 131 | +Zephyr build. Output is structured by the domain subdirectories: |
| 132 | + |
| 133 | +.. code-block:: |
| 134 | +
|
| 135 | + build/ |
| 136 | + ├── hello_world |
| 137 | + │ └── zephyr |
| 138 | + │ ├── zephyr.elf |
| 139 | + │ └── zephyr.bin |
| 140 | + ├── mcuboot |
| 141 | + │ └── zephyr |
| 142 | + │ ├── zephyr.elf |
| 143 | + │ └── zephyr.bin |
| 144 | + └── domains.yaml |
| 145 | +
|
| 146 | +.. note:: |
| 147 | + |
| 148 | + With ``--sysbuild`` option the bootloader will be re-build and re-flash |
| 149 | + every time the pristine build is used. |
| 150 | + |
| 151 | +For more information about the system build please read the :ref:`sysbuild` documentation. |
| 152 | + |
| 153 | +Manual build |
| 154 | +============ |
| 155 | + |
| 156 | +During the development cycle, it is intended to build & flash as quickly possible. |
| 157 | +For that reason, images can be built one at a time using traditional build. |
| 158 | + |
| 159 | +The instructions following are relevant for both manual build and sysbuild. |
| 160 | +The only difference is the structure of the build directory. |
| 161 | + |
| 162 | +.. note:: |
| 163 | + |
| 164 | + Remember that bootloader (MCUboot) needs to be flash at least once. |
| 165 | + |
| 166 | +Build and flash applications as usual (see :ref:`build_an_application` and |
| 167 | +:ref:`application_run` for more details). |
| 168 | + |
| 169 | +.. zephyr-app-commands:: |
| 170 | + :zephyr-app: samples/hello_world |
| 171 | + :board: esp32s3_matrix/esp32s3/procpu |
| 172 | + :goals: build |
| 173 | + |
| 174 | +The usual ``flash`` target will work with the ``esp32s3_matrix`` board |
| 175 | +configuration. Here is an example for the :zephyr:code-sample:`hello_world` |
| 176 | +application. |
| 177 | + |
| 178 | +.. zephyr-app-commands:: |
| 179 | + :zephyr-app: samples/hello_world |
| 180 | + :board: esp32s3_matrix/esp32s3/procpu |
| 181 | + :goals: flash |
| 182 | + |
| 183 | +Open the serial monitor using the following command: |
| 184 | + |
| 185 | +.. code-block:: shell |
| 186 | +
|
| 187 | + west espressif monitor |
| 188 | +
|
| 189 | +After the board has automatically reset and booted, you should see the following |
| 190 | +message in the monitor: |
| 191 | + |
| 192 | +.. code-block:: console |
| 193 | +
|
| 194 | + ***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx ***** |
| 195 | + Hello World! esp32s3_matrix |
| 196 | +
|
| 197 | +Debugging |
| 198 | +********* |
| 199 | + |
| 200 | +ESP32-S3 support on OpenOCD is available at `OpenOCD ESP32`_. |
| 201 | + |
| 202 | +ESP32-S3 has a built-in JTAG circuitry and can be debugged without any additional chip. Only an USB cable connected to the D+/D- pins is necessary. |
| 203 | + |
| 204 | +Further documentation can be obtained from the SoC vendor in `JTAG debugging for ESP32-S3`_. |
| 205 | + |
| 206 | +Here is an example for building the :zephyr:code-sample:`hello_world` application. |
| 207 | + |
| 208 | +.. zephyr-app-commands:: |
| 209 | + :zephyr-app: samples/hello_world |
| 210 | + :board: esp32s3_matrix/esp32s3/procpu |
| 211 | + :goals: build flash |
| 212 | + |
| 213 | +You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` application. |
| 214 | + |
| 215 | +.. zephyr-app-commands:: |
| 216 | + :zephyr-app: samples/hello_world |
| 217 | + :board: esp32s3_matrix/esp32s3/procpu |
| 218 | + :goals: debug |
| 219 | + |
| 220 | +References |
| 221 | +********** |
| 222 | + |
| 223 | +.. target-notes:: |
| 224 | + |
| 225 | +.. _ESP32-S3-Matrix Waveshare Wiki: https://www.waveshare.com/wiki/ESP32-S3-Matrix |
| 226 | +.. _ESP32-S3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf |
| 227 | +.. _ESP32-S3 Technical Reference Manual: https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_en.pdf |
| 228 | +.. _`JTAG debugging for ESP32-S3`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/ |
| 229 | +.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases |
0 commit comments