Initial commit with basic project structure and Firebeetle 2 board definition
7
boards/espressif/esp_wrover_kit/Kconfig
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config HEAP_MEM_POOL_ADD_SIZE_BOARD
|
||||
int
|
||||
default 4096 if BOARD_ESP_WROVER_KIT_ESP32_PROCPU
|
||||
default 256 if BOARD_ESP_WROVER_KIT_ESP32_APPCPU
|
||||
11
boards/espressif/esp_wrover_kit/Kconfig.defconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
# ESP-WROVER-KIT board configuration
|
||||
|
||||
# Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_ESP_WROVER_KIT_ESP32_PROCPU
|
||||
|
||||
config DISK_DRIVER_SDMMC
|
||||
default y
|
||||
|
||||
endif # BOARD_ESP_WROVER_KIT_ESP32_PROCPU
|
||||
9
boards/espressif/esp_wrover_kit/Kconfig.esp_wrover_kit
Normal file
@@ -0,0 +1,9 @@
|
||||
# ESP-WROVER-KIT board configuration
|
||||
|
||||
# Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_ESP_WROVER_KIT
|
||||
select SOC_ESP32_WROVER_E_N4R8
|
||||
select SOC_ESP32_PROCPU if BOARD_ESP_WROVER_KIT_ESP32_PROCPU
|
||||
select SOC_ESP32_APPCPU if BOARD_ESP_WROVER_KIT_ESP32_APPCPU
|
||||
10
boards/espressif/esp_wrover_kit/Kconfig.sysbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice BOOTLOADER
|
||||
default BOOTLOADER_MCUBOOT
|
||||
endchoice
|
||||
|
||||
choice BOOT_SIGNATURE_TYPE
|
||||
default BOOT_SIGNATURE_TYPE_NONE
|
||||
endchoice
|
||||
9
boards/espressif/esp_wrover_kit/board.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
|
||||
set(OPENOCD OPENOCD-NOTFOUND)
|
||||
endif()
|
||||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
6
boards/espressif/esp_wrover_kit/board.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
board:
|
||||
name: esp_wrover_kit
|
||||
full_name: ESP-WROVER-KIT
|
||||
vendor: espressif
|
||||
socs:
|
||||
- name: esp32
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 19 KiB |
BIN
boards/espressif/esp_wrover_kit/doc/img/esp_wrover_kit.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
621
boards/espressif/esp_wrover_kit/doc/index.rst
Normal file
@@ -0,0 +1,621 @@
|
||||
.. zephyr:board:: esp_wrover_kit
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
ESP-WROVER-KIT is an ESP32-based development board produced by `Espressif <https://www.espressif.com/>`_.
|
||||
|
||||
ESP-WROVER-KIT features the following integrated components:
|
||||
|
||||
- ESP32-WROVER-E module
|
||||
- LCD screen
|
||||
- MicroSD card slot
|
||||
|
||||
Its another distinguishing feature is the embedded FTDI FT2232HL chip - an advanced multi-interface
|
||||
USB bridge. This chip enables to use JTAG for direct debugging of ESP32 through the USB interface
|
||||
without a separate JTAG debugger. ESP-WROVER-KIT makes development convenient, easy, and
|
||||
cost-effective.
|
||||
|
||||
Most of the ESP32 I/O pins are broken out to the board's pin headers for easy access.
|
||||
|
||||
.. note::
|
||||
|
||||
ESP32's GPIO16 and GPIO17 are used as chip select and clock signals for PSRAM. By default, the two
|
||||
GPIOs are not broken out to the board's pin headers in order to ensure reliable performance.
|
||||
|
||||
For more information, check `ESP32-WROVER-E Datasheet`_ and `ESP32 Datasheet`_.
|
||||
|
||||
Functionality Overview
|
||||
**********************
|
||||
|
||||
The block diagram below shows the main components of ESP-WROVER-KIT and their interconnections.
|
||||
|
||||
.. image:: img/esp-wrover-kit-block-diagram.jpg
|
||||
:align: center
|
||||
:alt: ESP-WROVER-KIT
|
||||
|
||||
Functional Description
|
||||
**********************
|
||||
|
||||
The following two figures and the table below describe the key components, interfaces, and controls
|
||||
of the ESP-WROVER-KIT board.
|
||||
|
||||
.. figure:: img/esp_wrover_kit.jpg
|
||||
:align: center
|
||||
:alt: esp wrover front
|
||||
|
||||
ESP-WROVER-KIT board layout - front
|
||||
|
||||
.. _esp wrover back:
|
||||
|
||||
.. figure:: img/esp-wrover-kit-v4.1-layout-back.jpg
|
||||
:align: center
|
||||
:alt: esp wrover back
|
||||
|
||||
ESP-WROVER-KIT board layout - back
|
||||
|
||||
The table below provides description in the following manner:
|
||||
- Starting from the first picture's top right corner and going clockwise
|
||||
- Then moving on to the second picture
|
||||
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| Key Component | Description |
|
||||
+==================+=========================================================================+
|
||||
| FT2232 | The FT2232 chip serves as a multi-protocol USB-to-serial bridge |
|
||||
| | which can be programmed and controlled via USB to provide |
|
||||
| | communication with ESP32. FT2232 also features USB-to-JTAG |
|
||||
| | interface which is available on channel A of the chip, while USB-to- |
|
||||
| | serial is on channel B. The FT2232 chip enhances user-friendliness in |
|
||||
| | terms of application development and debugging. See `ESP-WROVER-KIT |
|
||||
| | V4.1 schematic |
|
||||
| | <https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf>`_. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| 32.768 kHz | External precision 32.768 kHz crystal oscillator serves as a clock with |
|
||||
| | low-power consumption while the chip is in Deep-sleep mode. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| 0R | Zero-ohm resistor intended as a placeholder for a current shunt, can |
|
||||
| | be desoldered or replaced with a current shunt to facilitate the |
|
||||
| | measurement of ESP32’s current consumption in different modes. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| ESP32-WROVER-E | This ESP32 module features 64-Mbit PSRAM for flexible extended |
|
||||
| module | storage and data processing capabilities. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| Diagnostic LEDs | Four red LEDs connected to the GPIO pins of FT2232. Intended for |
|
||||
| | future use. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| UART | Serial port. The serial TX/RX signals of FT2232 and ESP32 are broken |
|
||||
| | out to the inward and outward sides of JP2 respectively. By default, |
|
||||
| | these pairs of pins are connected with jumpers. To use ESP32’s serial |
|
||||
| | interface, remove the jumpers and connect another external serial |
|
||||
| | device to the respective pins. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| SPI | By default, ESP32 uses its SPI interface to access flash and PSRAM |
|
||||
| | memory inside the module. Use these pins to connect ESP32 to |
|
||||
| | another SPI device. In this case, an extra chip select (CS) signal is |
|
||||
| | needed. Please note that the voltage of this interface is 3.3 V. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| CTS/RTS | Serial port flow control signals: the pins are not connected to the |
|
||||
| | circuitry by default. To enable them, short the respective pins of JP14 |
|
||||
| | with jumpers. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| JTAG | JTAG interface. JTAG signals of FT2232 and ESP32 are broken out to |
|
||||
| | the inward and outward sides of JP2 respectively. By default, these |
|
||||
| | pairs of pins are disconnected. To enable JTAG, short the respective |
|
||||
| | pins with jumpers as shown in Section |
|
||||
| | :ref:`Setup Options<setup options>` |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| USB Port | USB interface. Power supply for the board as well as the |
|
||||
| | communication interface between a computer and the board. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| EN Button | Reset button. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| BOOT Button | Download button. Holding down Boot and then pressing EN initiates |
|
||||
| | Firmware Download mode for downloading firmware through the |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| Power Switch | Power On/Off Switch. Toggling toward the Boot button powers the |
|
||||
| | board on, toggling away from Boot powers the board off. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| Power Selector | Power supply selector interface. The board can be powered either via |
|
||||
| | USB or via the 5V Input interface. Select the power source with a |
|
||||
| | jumper. For more details, see Section Setup Options, jumper header |
|
||||
| | JP7. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| 5V input | 5V power supply interface for a standard coaxial power connector, |
|
||||
| | 5.5 x 2.1 mm, center positive. This interface can be more convenient |
|
||||
| | when the board is operating autonomously (not connected to a |
|
||||
| | computer). |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| 5V Power On LED | This red LED turns on when power is supplied to the board, either |
|
||||
| | from USB or 5V Input. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| LDO | NCP1117(1A). 5V-to-3.3V LDO. NCP1117 can provide a maximum |
|
||||
| | current of 1A. The LDO on the board has a fixed output voltage. |
|
||||
| | Although, the user can install an LDO with adjustable output voltage. |
|
||||
| | For details, please refer to `ESP-WROVER-KIT V4.1 schematic |
|
||||
| | <https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf>`_. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| Camera Connector | Camera interface, a standard OV7670 camera module. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| RGB LED | Red, green and blue (RGB) light emitting diodes (LEDs), can be |
|
||||
| | controlled by pulse width modulation (PWM). |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| I/O Connector | All the pins on the ESP32 module are broken out to pin headers. You |
|
||||
| | can program ESP32 to enable multiple functions, such as PWM, ADC, |
|
||||
| | DAC, I2C, I2S, SPI, etc. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| MicroSD Card | Useful for developing applications that access MicroSD card for data |
|
||||
| Slot | storage and retrieval. |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
| LCD | Support for mounting and interfacing a 3.2” SPI (standard 4-wire |
|
||||
| | Serial Peripheral Interface) LCD, as shown on figure |
|
||||
| | :ref:`ESP-WROVER-KIT board layout - back<esp wrover back>` |
|
||||
+------------------+-------------------------------------------------------------------------+
|
||||
|
||||
.. _setup options:
|
||||
|
||||
Setup Options
|
||||
*************
|
||||
|
||||
There are three jumper blocks available to set up the board functionality. The most frequently
|
||||
required options are listed in the table below.
|
||||
|
||||
.. |jmpextpwr| image:: img/esp-wrover-kit-v4.1-jp7-ext_5v.jpg
|
||||
|
||||
.. |jmpusbpwr| image:: img/esp-wrover-kit-v4.1-jp7-usb_5v.jpg
|
||||
|
||||
.. |jmpjtag| image:: img/esp-wrover-kit-v4.1-jp2-jtag.jpg
|
||||
|
||||
.. |jmpuart| image:: img/esp-wrover-kit-v4.1-jp2-tx-rx.jpg
|
||||
|
||||
.. |jmpctrl| image:: img/esp-wrover-kit-v4.1-jp14.jpg
|
||||
|
||||
+------------------+--------------------------------------------------------------+
|
||||
| Header | Jumper Setting | Description of Functionality |
|
||||
+========+================+=======================================================+
|
||||
| JP7 | |jmpextpwr| | Power ESP-WROVER-KIT via an external power supply |
|
||||
+--------+----------------+-------------------------------------------------------+
|
||||
| JP7 | |jmpusbpwr| | Power ESP-WROVER-KIT via USB |
|
||||
+--------+----------------+-------------------------------------------------------+
|
||||
| JP2 | |jmpjtag| | Enable JTAG functionality |
|
||||
+--------+----------------+-------------------------------------------------------+
|
||||
| JP2 | |jmpuart| | Enable UART communication |
|
||||
+--------+----------------+-------------------------------------------------------+
|
||||
| JP14 | |jmpctrl| | Enable RTS/CTS flow control for serial communication |
|
||||
+--------+----------------+-------------------------------------------------------+
|
||||
|
||||
Allocation of ESP32 Pins
|
||||
************************
|
||||
|
||||
Some pins / terminals of ESP32 are allocated for use with the onboard or external hardware. If
|
||||
that hardware is not used, e.g., nothing is plugged into the Camera (JP4) header, then these
|
||||
GPIOs can be used for other purposes.
|
||||
|
||||
Some of the pins, such as GPIO0 or GPIO2, have multiple functions and some of them are shared
|
||||
among onboard and external peripheral devices. Certain combinations of peripherals cannot work
|
||||
together. For example, it is not possible to do JTAG debugging of an application that is using
|
||||
SD card, because several pins are shared by JTAG and the SD card slot.
|
||||
|
||||
In other cases, peripherals can coexist under certain conditions. This is applicable to, for
|
||||
example, LCD screen and SD card that share only a single pin GPIO21. This pin is used to provide
|
||||
D/C (Data / Control) signal for the LCD as well as the Card Detect signal read from the SD card
|
||||
slot. If the card detect functionality is not essential, then it may be disabled by removing R167,
|
||||
so both LCD and SD may operate together.
|
||||
|
||||
For more details on which pins are shared among which peripherals, please refer to the table in
|
||||
the next section.
|
||||
|
||||
Main I/O Connector / JP1
|
||||
************************
|
||||
|
||||
The JP1 connector consists of 14x2 male pins whose functions are shown in the middle two “I/O”
|
||||
columns of the table below. The two “Shared With” columns on both sides describe where else on
|
||||
the board a certain GPIO is used.
|
||||
|
||||
+-------------------+------+------+----------------------+
|
||||
| Shared With | I/O | I/O | Shared With |
|
||||
+===================+======+======+======================+
|
||||
| n/a | 3.3V | GND | n/a |
|
||||
+-------------------+------+------+----------------------+
|
||||
| NC/XTAL | IO32 | IO33 | NC/XTAL |
|
||||
+-------------------+------+------+----------------------+
|
||||
| JTAG, MicroSD | IO12 | IO13 | JTAG, MicroSD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| JTAG, MicroSD | IO14 | IO27 | Camera |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera | IO26 | IO25 | Camera, LCD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera | IO35 | IO34 | Camera |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera | IO39 | IO36 | Camera |
|
||||
+-------------------+------+------+----------------------+
|
||||
| JTAG | EN | IO23 | Camera, LCD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera, LCD | IO22 | IO21 | Camera, LCD, MicroSD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera, LCD | IO19 | IO18 | Camera, LCD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera, LCD | IO5 | IO17 | PSRAM |
|
||||
+-------------------+------+------+----------------------+
|
||||
| PSRAM | IO16 | IO4 | LED, Camera, MicroSD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| Camera, LED, Boot | IO0 | IO2 | LED, MicroSD |
|
||||
+-------------------+------+------+----------------------+
|
||||
| JTAG, MicroSD | IO15 | 5V | |
|
||||
+-------------------+------+------+----------------------+
|
||||
|
||||
Legend:
|
||||
|
||||
- NC/XTAL - 32.768 kHz Oscillator
|
||||
- JTAG - JTAG / JP2
|
||||
- Boot - Boot button / SW2
|
||||
- Camera - Camera / JP4
|
||||
- LED - RGB LED
|
||||
- MicroSD - MicroSD Card / J4
|
||||
- LCD - LCD / U5
|
||||
- PSRAM - ESP32-WROVER-E's PSRAM
|
||||
|
||||
32.768 kHz Oscillator
|
||||
*********************
|
||||
|
||||
+---+-----------+
|
||||
| . | ESP32 Pin |
|
||||
+===+===========+
|
||||
| 1 | GPIO32 |
|
||||
+---+-----------+
|
||||
| 2 | GPIO33 |
|
||||
+---+-----------+
|
||||
|
||||
.. note::
|
||||
|
||||
Since GPIO32 and GPIO33 are connected to the oscillator by default, they are not connected to
|
||||
the JP1 I/O connector to maintain signal integrity. This allocation may be changed from the
|
||||
oscillator to JP1 by desoldering the zero-ohm resistors from positions R11 / R23 and re-soldering
|
||||
them to positions R12 / R24.
|
||||
|
||||
SPI Flash / JP2
|
||||
***************
|
||||
|
||||
+---+--------------+
|
||||
| . | ESP32 Pin |
|
||||
+===+==============+
|
||||
| 1 | CLK / GPIO6 |
|
||||
+---+--------------+
|
||||
| 2 | SD0 / GPIO7 |
|
||||
+---+--------------+
|
||||
| 3 | SD1 / GPIO8 |
|
||||
+---+--------------+
|
||||
| 4 | SD2 / GPIO9 |
|
||||
+---+--------------+
|
||||
| 5 | SD3 / GPIO10 |
|
||||
+---+--------------+
|
||||
| 6 | CDM / GPIO11 |
|
||||
+---+--------------+
|
||||
|
||||
.. important::
|
||||
The module's flash bus is connected to the jumper block JP2 through zero-ohm resistors R140 ~
|
||||
R145. If the flash memory needs to operate at the frequency of 80 MHz, for reasons such as
|
||||
improving the integrity of bus signals, you can desolder these resistors to disconnect the
|
||||
module's flash bus from the pin header JP2.
|
||||
|
||||
JTAG / JP2
|
||||
**********
|
||||
|
||||
+---+---------------+-------------+
|
||||
| . | ESP32 Pin | JTAG Signal |
|
||||
+===+===============+=============+
|
||||
| 1 | EN | TRST_N |
|
||||
+---+---------------+-------------+
|
||||
| 2 | MTMS / GPIO14 | TMS |
|
||||
+---+---------------+-------------+
|
||||
| 3 | MTDO / GPIO15 | TDO |
|
||||
+---+---------------+-------------+
|
||||
| 4 | MTDI / GPIO12 | TDI |
|
||||
+---+---------------+-------------+
|
||||
| 5 | MTCK / GPIO13 | TCK |
|
||||
+---+---------------+-------------+
|
||||
|
||||
Camera / JP4
|
||||
************
|
||||
|
||||
+----+-----------+-----------------------------+
|
||||
| . | ESP32 Pin | Camera Signal |
|
||||
+====+===========+=============================+
|
||||
| 1 | n/a | 3.3V |
|
||||
+----+-----------+-----------------------------+
|
||||
| 2 | n/a | Ground |
|
||||
+----+-----------+-----------------------------+
|
||||
| 3 | GPIO27 | SIO_C / SCCB Clock |
|
||||
+----+-----------+-----------------------------+
|
||||
| 4 | GPIO26 | SIO_D / SCCB Data |
|
||||
+----+-----------+-----------------------------+
|
||||
| 5 | GPIO25 | VSYNC / Vertical Sync |
|
||||
+----+-----------+-----------------------------+
|
||||
| 6 | GPIO23 | HREF / Horizontal Reference |
|
||||
+----+-----------+-----------------------------+
|
||||
| 7 | GPIO22 | PCLK / Pixel Clock |
|
||||
+----+-----------+-----------------------------+
|
||||
| 8 | GPIO21 | XCLK / System Clock |
|
||||
+----+-----------+-----------------------------+
|
||||
| 9 | GPIO35 | D7 / Pixel Data Bit 7 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 10 | GPIO34 | D6 / Pixel Data Bit 6 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 11 | GPIO39 | D5 / Pixel Data Bit 5 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 12 | GPIO36 | D4 / Pixel Data Bit 4 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 13 | GPIO19 | D3 / Pixel Data Bit 3 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 14 | GPIO18 | D2 / Pixel Data Bit 2 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 15 | GPIO5 | D1 / Pixel Data Bit 1 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 16 | GPIO4 | D0 / Pixel Data Bit 0 |
|
||||
+----+-----------+-----------------------------+
|
||||
| 17 | GPIO0 | RESET / Camera Reset |
|
||||
+----+-----------+-----------------------------+
|
||||
| 18 | n/a | PWDN / Camera Power Down |
|
||||
+----+-----------+-----------------------------+
|
||||
|
||||
- Signals D0 .. D7 denote camera data bus
|
||||
|
||||
RGB LED
|
||||
*******
|
||||
|
||||
+----+-----------+---------+
|
||||
| . | ESP32 Pin | RGB LED |
|
||||
+====+===========+=========+
|
||||
| 1 | GPIO0 | Red |
|
||||
+----+-----------+---------+
|
||||
| 2 | GPIO2 | Green |
|
||||
+----+-----------+---------+
|
||||
| 3 | GPIO4 | Blue |
|
||||
+----+-----------+---------+
|
||||
|
||||
MicroSD Card
|
||||
************
|
||||
|
||||
+---+---------------+----------------+
|
||||
| . | ESP32 Pin | MicroSD Signal |
|
||||
+===+===============+================+
|
||||
| 1 | MTDI / GPIO12 | DATA2 |
|
||||
+---+---------------+----------------+
|
||||
| 2 | MTCK / GPIO13 | CD / DATA3 |
|
||||
+---+---------------+----------------+
|
||||
| 3 | MTDO / GPIO15 | CMD |
|
||||
+---+---------------+----------------+
|
||||
| 4 | MTMS / GPIO14 | CLK |
|
||||
+---+---------------+----------------+
|
||||
| 5 | GPIO2 | DATA0 |
|
||||
+---+---------------+----------------+
|
||||
| 6 | GPIO4 | DATA1 |
|
||||
+---+---------------+----------------+
|
||||
| 7 | GPIO21 | Card Detect |
|
||||
+---+---------------+----------------+
|
||||
|
||||
LCD / U5
|
||||
********
|
||||
|
||||
+---+-----------+------------+
|
||||
| . | ESP32 Pin | LCD Signal |
|
||||
+===+===========+============+
|
||||
| 1 | GPIO18 | RESET |
|
||||
+---+-----------+------------+
|
||||
| 2 | GPIO19 | SCL |
|
||||
+---+-----------+------------+
|
||||
| 3 | GPIO21 | D/C |
|
||||
+---+-----------+------------+
|
||||
| 4 | GPIO22 | CS |
|
||||
+---+-----------+------------+
|
||||
| 5 | GPIO23 | SDA |
|
||||
+---+-----------+------------+
|
||||
| 6 | GPIO25 | SDO |
|
||||
+---+-----------+------------+
|
||||
| 7 | GPIO5 | Backlight |
|
||||
+---+-----------+------------+
|
||||
|
||||
Start Application Development
|
||||
*****************************
|
||||
|
||||
Before powering up your ESP-WROVER-KIT, please make sure that the board is in good
|
||||
condition with no obvious signs of damage.
|
||||
|
||||
Initial Setup
|
||||
*************
|
||||
|
||||
Please set only the following jumpers shown in the pictures below:
|
||||
|
||||
- Select USB as the power source using the jumper block JP7.
|
||||
- Enable UART communication using the jumper block JP2.
|
||||
|
||||
+------------------------+---------------------------+
|
||||
| Power up from USB port | Enable UART communication |
|
||||
+========+===============+===========================+
|
||||
| |jmpusbpwr| | |jmpuart| |
|
||||
+------------------------+---------------------------+
|
||||
|
||||
Do not install any other jumpers.
|
||||
|
||||
Turn the Power Switch to ON, the 5V Power On LED should light up.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
.. zephyr:board-supported-hw::
|
||||
|
||||
System requirements
|
||||
===================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
|
||||
below to retrieve those files.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
west blobs fetch hal_espressif
|
||||
|
||||
.. note::
|
||||
|
||||
It is recommended running the command above after :file:`west update`.
|
||||
|
||||
Building & Flashing
|
||||
*******************
|
||||
|
||||
.. zephyr:board-supported-runners::
|
||||
|
||||
Simple boot
|
||||
===========
|
||||
|
||||
The board could be loaded using the single binary image, without 2nd stage bootloader.
|
||||
It is the default option when building the application without additional configuration.
|
||||
|
||||
.. note::
|
||||
|
||||
Simple boot does not provide any security features nor OTA updates.
|
||||
|
||||
MCUboot bootloader
|
||||
==================
|
||||
|
||||
User may choose to use MCUboot bootloader instead. In that case the bootloader
|
||||
must be built (and flashed) at least once.
|
||||
|
||||
There are two options to be used when building an application:
|
||||
|
||||
1. Sysbuild
|
||||
2. Manual build
|
||||
|
||||
.. note::
|
||||
|
||||
User can select the MCUboot bootloader by adding the following line
|
||||
to the board default configuration file.
|
||||
|
||||
.. code:: cfg
|
||||
|
||||
CONFIG_BOOTLOADER_MCUBOOT=y
|
||||
|
||||
Sysbuild
|
||||
========
|
||||
|
||||
The sysbuild makes possible to build and flash all necessary images needed to
|
||||
bootstrap the board with the ESP32 SoC.
|
||||
|
||||
To build the sample application using sysbuild use the command:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:tool: west
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp_wrover_kit
|
||||
:goals: build
|
||||
:west-args: --sysbuild
|
||||
:compact:
|
||||
|
||||
By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
|
||||
images. But it can be configured to create other kind of images.
|
||||
|
||||
Build directory structure created by sysbuild is different from traditional
|
||||
Zephyr build. Output is structured by the domain subdirectories:
|
||||
|
||||
.. code-block::
|
||||
|
||||
build/
|
||||
├── hello_world
|
||||
│ └── zephyr
|
||||
│ ├── zephyr.elf
|
||||
│ └── zephyr.bin
|
||||
├── mcuboot
|
||||
│ └── zephyr
|
||||
│ ├── zephyr.elf
|
||||
│ └── zephyr.bin
|
||||
└── domains.yaml
|
||||
|
||||
.. note::
|
||||
|
||||
With ``--sysbuild`` option the bootloader will be re-build and re-flash
|
||||
every time the pristine build is used.
|
||||
|
||||
For more information about the system build please read the :ref:`sysbuild` documentation.
|
||||
|
||||
Manual build
|
||||
============
|
||||
|
||||
During the development cycle, it is intended to build & flash as quickly possible.
|
||||
For that reason, images can be built one at a time using traditional build.
|
||||
|
||||
The instructions following are relevant for both manual build and sysbuild.
|
||||
The only difference is the structure of the build directory.
|
||||
|
||||
.. note::
|
||||
|
||||
Remember that bootloader (MCUboot) needs to be flash at least once.
|
||||
|
||||
Build and flash applications as usual (see :ref:`build_an_application` and
|
||||
:ref:`application_run` for more details).
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp_wrover_kit/esp32/procpu
|
||||
:goals: build
|
||||
|
||||
The usual ``flash`` target will work with the ``esp_wrover_kit`` board
|
||||
configuration. Here is an example for the :zephyr:code-sample:`hello_world`
|
||||
application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp_wrover_kit/esp32/procpu
|
||||
:goals: flash
|
||||
|
||||
Open the serial monitor using the following command:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
west espressif monitor
|
||||
|
||||
After the board has automatically reset and booted, you should see the following
|
||||
message in the monitor:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
||||
Hello World! esp_wrover_kit
|
||||
|
||||
Debugging
|
||||
*********
|
||||
|
||||
ESP32 support on OpenOCD is available at `OpenOCD ESP32`_.
|
||||
|
||||
On the ESP-WROVER-KIT board, the JTAG pins are connected internally to
|
||||
a USB serial port on the same device as the console. These boards
|
||||
require no external hardware and are debuggable as-is. The JTAG
|
||||
signals, however, must be jumpered closed to connect the internal
|
||||
controller (the default is to leave them disconnected). The jumper
|
||||
headers are on the right side of the board as viewed from the power
|
||||
switch, next to similar headers for SPI and UART. See
|
||||
`ESP-WROVER-32 V3 Getting Started Guide`_ for details.
|
||||
|
||||
Here is an example for building the :zephyr:code-sample:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp_wrover_kit/esp32/procpu
|
||||
:goals: build flash
|
||||
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp_wrover_kit/esp32/procpu
|
||||
:goals: debug
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _`ESP32 Datasheet`: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf (PDF)
|
||||
.. _`ESP32-WROVER-E Datasheet`: https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf (PDF)
|
||||
.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases
|
||||
.. _`ESP-WROVER-32 V3 Getting Started Guide`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html
|
||||
85
boards/espressif/esp_wrover_kit/esp_wrover_kit-pinctrl.dtsi
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
|
||||
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
|
||||
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>
|
||||
|
||||
&pinctrl {
|
||||
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
pinmux = <UART0_TX_GPIO1>;
|
||||
output-high;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <UART0_RX_GPIO3>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart1_default: uart1_default {
|
||||
group1 {
|
||||
pinmux = <UART1_TX_GPIO32>;
|
||||
output-high;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <UART1_RX_GPIO33>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
spim2_default: spim2_default {
|
||||
group1 {
|
||||
pinmux = <SPIM2_MISO_GPIO12>,
|
||||
<SPIM2_SCLK_GPIO14>,
|
||||
<SPIM2_CSEL_GPIO15>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <SPIM2_MOSI_GPIO13>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
spim3_default: spim3_default {
|
||||
group1 {
|
||||
pinmux = <SPIM3_MISO_GPIO25>,
|
||||
<SPIM3_SCLK_GPIO19>,
|
||||
<SPIM3_CSEL_GPIO22>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <SPIM3_MOSI_GPIO23>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
pinmux = <I2C0_SDA_GPIO21>,
|
||||
<I2C0_SCL_GPIO22>;
|
||||
bias-pull-up;
|
||||
drive-open-drain;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
ledc0_default: ledc0_default {
|
||||
group1 {
|
||||
pinmux = <LEDC_CH0_GPIO0>,
|
||||
<LEDC_CH1_GPIO2>,
|
||||
<LEDC_CH2_GPIO4>;
|
||||
output-enable;
|
||||
};
|
||||
};
|
||||
|
||||
sdhc0_default: sdhc0_default {
|
||||
group1 {
|
||||
pinmux = <SDHC0_CD_GPIO21>;
|
||||
bias-pull-up;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
30
boards/espressif/esp_wrover_kit/esp_wrover_kit_appcpu.dts
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include <espressif/esp32/esp32_appcpu.dtsi>
|
||||
#include <espressif/partitions_0x1000_amp.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Espressif ESP32-Wrover-Kit APPCPU";
|
||||
compatible = "espressif,esp32";
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram1;
|
||||
zephyr,ipc_shm = &shm0;
|
||||
zephyr,ipc = &ipm0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_appcpu_partition;
|
||||
};
|
||||
};
|
||||
|
||||
&ipm0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&trng0 {
|
||||
status = "okay";
|
||||
};
|
||||
27
boards/espressif/esp_wrover_kit/esp_wrover_kit_appcpu.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
identifier: esp_wrover_kit/esp32/appcpu
|
||||
name: ESP WROVER KIT APPCPU
|
||||
type: mcu
|
||||
arch: xtensa
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported:
|
||||
- uart
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
||||
- flash
|
||||
- cpp
|
||||
- posix
|
||||
- watchdog
|
||||
- logging
|
||||
- kernel
|
||||
- pm
|
||||
- gpio
|
||||
- crypto
|
||||
- eeprom
|
||||
- heap
|
||||
- cmsis_rtos
|
||||
- jwt
|
||||
- zdsp
|
||||
vendor: espressif
|
||||
@@ -0,0 +1,3 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
224
boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include <espressif/esp32/esp32_wrover_e_n4r8.dtsi>
|
||||
#include "esp_wrover_kit-pinctrl.dtsi"
|
||||
#include <espressif/partitions_0x1000_amp.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Espressif ESP32-Wrover-Kit PROCPU";
|
||||
compatible = "espressif,esp32";
|
||||
|
||||
aliases {
|
||||
led0 = &blue_led;
|
||||
led1 = &green_led;
|
||||
led2 = &red_led;
|
||||
pwm-led0 = &pwm_led_red;
|
||||
pwm-led1 = &pwm_led_green;
|
||||
pwm-led2 = &pwm_led_blue;
|
||||
red-pwm-led = &pwm_led_red;
|
||||
green-pwm-led = &pwm_led_green;
|
||||
blue-pwm-led = &pwm_led_blue;
|
||||
uart-0 = &uart0;
|
||||
i2c-0 = &i2c0;
|
||||
watchdog0 = &wdt0;
|
||||
sdhc0 = &sdhc1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram1;
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
zephyr,display = &ili9341;
|
||||
zephyr,sdhc = &sdhc1;
|
||||
zephyr,bt-hci = &esp32_bt_hci;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue - LED0";
|
||||
};
|
||||
|
||||
green_led: led_1 {
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
|
||||
label = "Green - LED1";
|
||||
};
|
||||
|
||||
red_led: led_2 {
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
|
||||
label = "Red - LED2";
|
||||
};
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_red: pwm_led_0 {
|
||||
label = "Red PWM LED";
|
||||
pwms = <&ledc0 0 PWM_HZ(100) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
pwm_led_green: pwm_led_1 {
|
||||
label = "Green PWM LED";
|
||||
pwms = <&ledc0 1 PWM_HZ(100) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
pwm_led_blue: pwm_led_2 {
|
||||
label = "Blue PWM LED";
|
||||
pwms = <&ledc0 2 PWM_HZ(100) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
mipi_dbi {
|
||||
compatible = "zephyr,mipi-dbi-spi";
|
||||
dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
spi-dev = <&spi3>;
|
||||
write-only;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ili9341: ili9341@0 {
|
||||
compatible = "ilitek,ili9341";
|
||||
mipi-max-frequency = <25000000>;
|
||||
reg = <0>;
|
||||
pixel-format = <0>;
|
||||
rotation = <0>;
|
||||
width = <240>;
|
||||
height = <320>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
status = "disabled";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart1_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
|
||||
/* FIXME: should be part of the display node */
|
||||
lcd-backlight {
|
||||
gpio-hog;
|
||||
gpios = <5 GPIO_ACTIVE_HIGH>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>;
|
||||
scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spim2_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spim3_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&ledc0 {
|
||||
pinctrl-0 = <&ledc0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
channel0@0 {
|
||||
reg = <0x0>;
|
||||
timer = <0>;
|
||||
};
|
||||
channel1@1 {
|
||||
reg = <0x1>;
|
||||
timer = <1>;
|
||||
};
|
||||
channel2@2 {
|
||||
reg = <0x2>;
|
||||
timer = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&timer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&timer1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&timer2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&timer3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&trng0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhc {
|
||||
sdhc1: sdhc@1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&sdhc0_default>;
|
||||
pinctrl-names = "default";
|
||||
power-delay-ms = <100>;
|
||||
max-bus-freq = <52000000>;
|
||||
bus-width = <4>;
|
||||
|
||||
clk-pin = <14>;
|
||||
cmd-pin = <15>;
|
||||
d0-pin = <2>;
|
||||
d1-pin = <4>;
|
||||
d2-pin = <12>;
|
||||
d3-pin = <13>;
|
||||
|
||||
mmc {
|
||||
compatible = "zephyr,sdmmc-disk";
|
||||
disk-name = "SD";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&esp32_bt_hci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
20
boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
identifier: esp_wrover_kit/esp32/procpu
|
||||
name: ESP WROVER KIT PROCPU
|
||||
type: mcu
|
||||
arch: xtensa
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported:
|
||||
- adc
|
||||
- dac
|
||||
- gpio
|
||||
- i2c
|
||||
- watchdog
|
||||
- uart
|
||||
- nvs
|
||||
- pwm
|
||||
- sdhc
|
||||
- spi
|
||||
- counter
|
||||
- entropy
|
||||
vendor: espressif
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
CONFIG_GPIO=y
|
||||
5
boards/espressif/esp_wrover_kit/support/openocd.cfg
Normal file
@@ -0,0 +1,5 @@
|
||||
set ESP_RTOS none
|
||||
set ESP32_ONLYCPU 1
|
||||
|
||||
source [find interface/ftdi/esp32_devkitj_v1.cfg]
|
||||
source [find target/esp32.cfg]
|
||||