-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/waveshare-esp32s3-touch-lcd-128: add board support #22231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tuyahia
wants to merge
7
commits into
RIOT-OS:master
Choose a base branch
from
tuyahia:boards/waveshare-round-esp32s3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8fb6992
boards/waveshare-round-esp32s3: add board support
tuyahia 084158b
boards/waveshare-round-esp32s3: fix newline formatting
tuyahia 6e7abd9
boards/waveshare-round-esp32s3: apply formatting suggestions
tuyahia 1a2cdf5
boards/waveshare-esp32s3-touch-lcd-128: rename board
tuyahia e5e8638
boards/waveshare-esp32s3-touch-lcd-128: add attribution to doc
tuyahia 696cfea
boards/waveshare-esp32s3-touch-lcd-128: apply documentation formattin…
tuyahia 4c4c0cd
boards/waveshare-esp32s3-touch-lcd-128: fix renaming artifacts
tuyahia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # SPDX-FileCopyrightText: 2026 Technische Universität Hamburg | ||
| # SPDX-License-Identifier: LGPL-2.1-only | ||
|
|
||
| config BOARD | ||
| default "waveshare-round-esp32s3" if BOARD_WAVESHARE_ROUND_ESP32S3 | ||
|
|
||
| config BOARD_WAVESHARE_ROUND_ESP32S3 | ||
| bool | ||
| default y | ||
| select BOARD_COMMON_ESP32S3 | ||
| select CPU_MODEL_ESP32S3_R2 | ||
|
|
||
| source "$(RIOTBOARD)/common/esp32s3/Kconfig" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| MODULE = board | ||
|
|
||
| include $(RIOTBASE)/Makefile.base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ifneq (,$(filter saul_default,$(USEMODULE))) | ||
| USEMODULE += saul_gpio | ||
| endif | ||
|
|
||
| ifneq (,$(filter disp_dev,$(USEMODULE))) | ||
| USEMODULE += gc9a01 | ||
| endif | ||
|
|
||
| ifneq (,$(filter touch_dev,$(USEMODULE))) | ||
| USEMODULE += cst816s | ||
| endif | ||
|
|
||
| include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk | ||
| include $(RIOTBOARD)/common/esp32s3/Makefile.dep | ||
|
|
||
| USEMODULE += boards_common_esp32s3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # the board uses an ESP32-S3R2 with 2 MB embedded SPI RAM. | ||
| CPU_MODEL = esp32s3_r2 | ||
|
|
||
| # common board and CPU features | ||
| include $(RIOTBOARD)/common/esp32s3/Makefile.features | ||
|
|
||
| # peripherals provided by the board | ||
| FEATURES_PROVIDED += periph_adc | ||
| FEATURES_PROVIDED += periph_i2c | ||
| FEATURES_PROVIDED += periph_spi | ||
| FEATURES_PROVIDED += periph_usbdev | ||
|
|
||
| # other features provided by the board | ||
| FEATURES_PROVIDED += esp_spi_ram |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| PORT_LINUX ?= /dev/ttyACM0 | ||
|
|
||
| OPENOCD_CONFIG ?= board/esp32s3-builtin.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2023 Gunar Schorcht | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_waveshare-round-esp32s3 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific initializations for the Waveshare ESP32S3 round display board (Touch version) | ||
| * | ||
| * @author Gunar Schorcht <gunar@schorcht.net> | ||
| */ | ||
|
|
||
| #include "board.h" | ||
|
|
||
| void board_init(void) | ||
| { | ||
| #if MODULE_GC9A01 | ||
| gpio_init(LCD_BACKLIGHT, GPIO_OUT); | ||
| #endif | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: 2026 Technische Universität Hamburg | ||
| SPDX-License-Identifier: LGPL-2.1-only | ||
| --> | ||
|
|
||
| @defgroup boards_waveshare-round-esp32s3 Waveshare ESP32-S3-Touch-LCD-1.28 | ||
| @ingroup boards_esp32s3 | ||
| @brief Support for the Waveshare ESP32-S3-Touch-LCD-1.28 board | ||
| @author Yahia Abdella <yahia.abdella@tuhh.de> | ||
|
|
||
| \section waveshare_round_esp32s3 Waveshare ESP32-S3-Touch-LCD-1.28 | ||
|
|
||
| ## Table of Contents {#waveshare_round_esp32s3_toc} | ||
|
|
||
| 1. [Overview](#waveshare_round_esp32s3_overview) | ||
| 2. [Hardware](#waveshare_round_esp32s3_hardware) | ||
| 1. [MCU](#waveshare_round_esp32s3_mcu) | ||
| 2. [Board Configuration](#waveshare_round_esp32s3_board_configuration) | ||
| 3. [Board Pinout](#waveshare_round_esp32s3_pinout) | ||
| 3. [Flashing the Device](#waveshare_round_esp32s3_flashing) | ||
|
|
||
| ## Overview {#waveshare_round_esp32s3_overview} | ||
|
|
||
| The Waveshare ESP32-S3-Touch-LCD-1.28 is a compact development board built around the | ||
| ESP32-S3 microcontroller with an integrated 1.28-inch round TFT LCD display and | ||
| capacitive touch panel. | ||
|
|
||
| \image html https://www.waveshare.net/photo/development-board/ESP32-S3-Touch-LCD-1.28/ESP32-S3-Touch-LCD-1.28-1.jpg "Waveshare ESP32-S3-Touch-LCD-1.28" width=400px | ||
|
|
||
| The main features of the board are: | ||
|
|
||
| - ESP32-S3-N8R2 SoC with 2.4 GHz WiFi (802.11 b/g/n) and Bluetooth 5, BLE | ||
| - 16 MB Flash | ||
| - 2 MB PSRAM | ||
| - 1.28-inch 240x240 round IPS LCD (GC9A01 driver) | ||
| - Capacitive touch panel (CST816S controller) | ||
| - 6-axis IMU (QMI8658 accelerometer + gyroscope) | ||
| - USB Type-C connector | ||
| - Battery charging circuit with battery voltage monitoring | ||
| - BOOT button (active low, directly usable as user button) | ||
|
|
||
| [Back to table of contents](#waveshare_round_esp32s3_toc) | ||
|
|
||
| ## Hardware {#waveshare_round_esp32s3_hardware} | ||
|
|
||
| This section describes | ||
|
|
||
| - the [MCU](#waveshare_round_esp32s3_mcu), | ||
| - the default [board configuration](#waveshare_round_esp32s3_board_configuration), | ||
| - the [board pinout](#waveshare_round_esp32s3_pinout). | ||
|
|
||
| [Back to table of contents](#waveshare_round_esp32s3_toc) | ||
|
|
||
| ### MCU {#waveshare_round_esp32s3_mcu} | ||
|
|
||
| Most features of the board are provided by the ESP32-S3 SoC. For detailed | ||
| information about the ESP32-S3 SoC variant (family) and ESP32x SoCs, | ||
| see section \ref esp32_mcu_esp32 "ESP32 SoC Series". | ||
|
|
||
| [Back to table of contents](#waveshare_round_esp32s3_toc) | ||
|
|
||
| ### Board Configuration {#waveshare_round_esp32s3_board_configuration} | ||
|
|
||
| The board integrates a 1.28-inch round IPS LCD driven by a GC9A01 display controller | ||
| via SPI, a CST816S capacitive touch controller connected via I2C, and a QMI8658 | ||
| 6-axis IMU also connected via I2C. A BOOT button on GPIO0 is directly usable | ||
| as a user button. | ||
|
|
||
| The default board configuration provides: | ||
|
|
||
| - 1 x ADC channel (battery voltage monitoring) | ||
| - 1 x SPI (display) | ||
| - 1 x I2C (touch controller and IMU) | ||
| - 1 x UART (console) | ||
|
|
||
| The following table shows the default board configuration sorted by | ||
| peripheral function. This configuration can be overridden by | ||
| \ref esp32_application_specific_configurations | ||
| "application-specific configurations". | ||
|
|
||
| <center> | ||
| Function | GPIOs | Remarks | Configuration | ||
| :---------------|:-------|:--------|:---------------------------------- | ||
| BTN0 | GPIO0 | | | | ||
| ADC_LINE(0) | GPIO1 | Battery voltage | \ref esp32_adc_channels "ADC Channels" | ||
| SPI_DEV(0) CLK | GPIO10 | LCD SCLK, GC9A01 | \ref esp32_spi_interfaces "SPI Interfaces" | ||
| SPI_DEV(0) MOSI | GPIO11 | LCD SDA, GC9A01 | \ref esp32_spi_interfaces "SPI Interfaces" | ||
| SPI_DEV(0) MISO | GPIO12 | LCD SDO, GC9A01 | \ref esp32_spi_interfaces "SPI Interfaces" | ||
| SPI_DEV(0) CS0 | GPIO9 | LCD CS, GC9A01 | \ref esp32_spi_interfaces "SPI Interfaces" | ||
| LCD DC | GPIO8 | GC9A01 data/command | | | ||
| LCD RST | GPIO14 | GC9A01 reset | | | ||
| LCD BL | GPIO2 | Backlight control | | | ||
| I2C_DEV(0) SCL | GPIO7 | Touch + IMU | \ref esp32_i2c_interfaces "I2C Interfaces" | ||
| I2C_DEV(0) SDA | GPIO6 | Touch + IMU | \ref esp32_i2c_interfaces "I2C Interfaces" | ||
| Touch IRQ | GPIO5 | CST816S interrupt | | | ||
| Touch RST | GPIO13 | CST816S reset | | | ||
| UART_DEV(0) TxD | GPIO43 | Console (fixed) | \ref esp32_uart_interfaces "UART interfaces" | ||
| UART_DEV(0) RxD | GPIO44 | Console (fixed) | \ref esp32_uart_interfaces "UART interfaces" | ||
| </center> | ||
| \n | ||
|
|
||
| For detailed information about the peripheral configurations of ESP32-S3 | ||
| boards, see section \ref esp32_peripherals "Common Peripherals". | ||
|
|
||
| [Back to table of contents](#waveshare_round_esp32s3_toc) | ||
|
|
||
| ### Board Pinout {#waveshare_round_esp32s3_pinout} | ||
|
|
||
| The following figures show the board hardware layout. | ||
|
|
||
| @image html https://docs.waveshare.com/assets/images/Esp32-s3-touch-lcd-1.28-003-c7bcf4bd1440b55a43abb060ad67d705.webp "Waveshare ESP32-S3-Touch-LCD-1.28 Hardware Layout" width=600px | ||
|
|
||
| @image html https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-1.28-pin-e2103bcf84f511752bbc41ceb86bbf56.webp "Waveshare ESP32-S3-Touch-LCD-1.28 Hardware Layout" width=600px | ||
|
|
||
| The board schematic and additional documentation can be found on the | ||
| [Waveshare Wiki](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28). | ||
|
|
||
| [Back to table of contents](#waveshare_round_esp32s3_toc) | ||
|
|
||
| ## Flashing the Device {#waveshare_round_esp32s3_flashing} | ||
|
|
||
| Flashing RIOT is quite easy. The board has a USB-C connector with | ||
| reset/boot/flash logic. Just connect the board to your host computer | ||
| and run: | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| BOARD=waveshare_round_esp32s3 make flash ... | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| For detailed information about ESP32-S3 as well as configuring and compiling | ||
| RIOT for ESP32-S3 boards, see \ref esp32_riot. | ||
|
|
||
| [Back to table of contents](#esp32s3_devkit_toc) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 Technische Universität Hamburg | ||
| * SPDX-FileCopyrightText: 2023 Gunar Schorcht | ||
|
tuyahia marked this conversation as resolved.
Outdated
|
||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| /** | ||
| * @ingroup boards_waveshare-round-esp32s3 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific definitions for the Waveshare ESP32S3 round display board (Touch version) | ||
|
tuyahia marked this conversation as resolved.
Outdated
|
||
| * | ||
| * @author Yahia Abdella <yahia.abdella@tuhh.de> | ||
| * @author Gunar Schorcht <gunar@schorcht.net> | ||
|
tuyahia marked this conversation as resolved.
Outdated
|
||
| */ | ||
|
|
||
| /** | ||
| * @name Button pin definitions | ||
| * @{ | ||
| */ | ||
|
|
||
| /** | ||
| * @brief Default button GPIO pin definition | ||
| * | ||
| * The board has a BOOT button connected to GPIO0, which can be | ||
| * used as button during normal operation. Since the GPIO0 pin is pulled up, | ||
| * the button signal is inverted, i.e., pressing the button will give a | ||
| * low signal. | ||
| */ | ||
| #define BTN0_PIN GPIO0 | ||
|
|
||
| /** | ||
| * @brief Default button GPIO mode definition | ||
| */ | ||
| #define BTN0_MODE GPIO_IN_PU | ||
|
|
||
| /** | ||
| * @brief Default interrupt flank definition for the button GPIO | ||
| */ | ||
| #ifndef BTN0_INT_FLANK | ||
| # define BTN0_INT_FLANK GPIO_FALLING | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief Definition for compatibility with previous versions | ||
| */ | ||
| #define BUTTON0_PIN BTN0_PIN | ||
|
|
||
| /** @} */ | ||
|
|
||
| /** | ||
| * @name LCD configuration | ||
| * | ||
| * The board features a 240x240 TFT display being driven by a GC9A01 LCD driver | ||
| * The display driver is connected via SPI | ||
| * | ||
| * @{ | ||
| */ | ||
| #if MODULE_GC9A01 | ||
| # define LCD_DC GPIO8 /**< LCD DC signal */ | ||
| # define LCD_CS GPIO9 /**< LCD EN signal */ | ||
| # define LCD_RST GPIO14 /**< LCD RST signal */ | ||
| # define LCD_BACKLIGHT GPIO2 /**< LCD BL signal */ | ||
|
|
||
| # define GC9A01_PARAM_CS LCD_CS | ||
| # define GC9A01_PARAM_DCX LCD_DC | ||
| # define GC9A01_PARAM_RST LCD_RST | ||
| # define GC9A01_PARAM_NUM_LINES 240 | ||
| # define GC9A01_PARAM_RGB_CHANNELS 240 | ||
| # define GC9A01_PARAM_INVERTED 1 | ||
| # define GC9A01_PARAM_RGB 0 | ||
| # ifndef GC9A01_PARAM_ROTATION | ||
| # define GC9A01_PARAM_ROTATION GC9A01_ROTATION_VERT | ||
| # endif | ||
| # ifndef GC9A01_PARAM_SPI_CLK | ||
| # define GC9A01_PARAM_SPI_CLK SPI_CLK_10MHZ | ||
| # endif | ||
|
|
||
| # define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT) | ||
| # define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT) | ||
| #endif | ||
| /** @} */ | ||
|
|
||
| /** | ||
| * @name Touch panel configuration | ||
| * | ||
| * The board features a CST816S touch display driver | ||
| * The touch chip is connected via I2C | ||
| * | ||
| * @{ | ||
| */ | ||
| #if MODULE_CST816S | ||
| # define CST816S_PARAM_I2C_DEV I2C_DEV(0) | ||
| # define CST816S_PARAM_IRQ GPIO5 | ||
| # define CST816S_PARAM_RESET GPIO13 | ||
| #endif | ||
| /** @} */ | ||
|
|
||
| /** | ||
| * @name IMU configuration | ||
| * | ||
| * The board features a QMI8658 interial measurement unit | ||
| * The IMU is connected via I2C | ||
| * | ||
| * @{ | ||
| */ | ||
| #if MODULE_QMI8658 | ||
| # define QMI8658_PARAM_I2C I2C_DEV(0) | ||
| #endif | ||
| /** @} */ | ||
|
|
||
| /* include common board definitions as last step */ | ||
| #include "board_common.h" | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| /** @} */ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2023 Gunar Schorcht | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| /** | ||
| * @ingroup boards_waveshare-round-esp32s3 | ||
| * @brief Board specific configuration of direct mapped GPIOs | ||
| * @file | ||
| * @author Gunar Schorcht <gunar@schorcht.net> | ||
| * @{ | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "saul/periph.h" | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief Boot button configuration | ||
| */ | ||
| static const saul_gpio_params_t saul_gpio_params[] = | ||
| { | ||
| { | ||
| .name = "BOOT", | ||
| .pin = BTN0_PIN, | ||
| .mode = BTN0_MODE, | ||
| .flags = SAUL_GPIO_INVERTED | ||
| }, | ||
| }; | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| /** @} */ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.