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