Skip to content

Commit 1285c4c

Browse files
committed
boards/esp32s3-seeedstudio: seeedstudio xiao esp32s3 board support. mostly copied from esp32s3-pros3 board files.
1 parent 20f7328 commit 1285c4c

File tree

9 files changed

+510
-0
lines changed

9 files changed

+510
-0
lines changed

boards/esp32s3-seeedstudio/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2024 TUDresden
2+
# 2024 Isikcan 'Jon' Yilmaz - TUDresden
3+
#
4+
# This file is subject to the terms and conditions of the GNU Lesser
5+
# General Public License v2.1. See the file LICENSE in the top level
6+
# directory for more details.
7+
8+
config BOARD
9+
default "esp32s3-seeedstudio" if BOARD_ESP32S3_SEEEDSTUDIO
10+
11+
config BOARD_ESP32S3_SEEEDSTUDIO
12+
bool
13+
default y
14+
select BOARD_COMMON_ESP32S3
15+
select CPU_MODEL_ESP32S3
16+
17+
source "$(RIOTBOARD)/common/esp32s3/Kconfig"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MODULE = board
2+
3+
DIRS = $(RIOTBOARD)/common/esp32s3
4+
5+
include $(RIOTBASE)/Makefile.base
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ifeq (,$(filter stdio_% slipdev_stdio usbus usbus% tinyusb_device,$(USEMODULE)))
2+
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
3+
# and neither USBUS nor tinyusb_device are used
4+
USEMODULE += stdio_usb_serial_jtag
5+
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
6+
# since there should be a CDC ACM interface in any case. This is necessary,
7+
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
8+
# was previously used.
9+
USEMODULE += usb_board_reset
10+
include $(RIOTMAKE)/tools/usb_board_reset.mk
11+
endif
12+
13+
ifneq (,$(filter saul_default,$(USEMODULE)))
14+
USEMODULE += saul_gpio
15+
endif
16+
17+
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
18+
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# the board uses a ESP32-S3 with a 16MB QSPI Flash and a 8MB QSPI PSRAM
2+
CPU_MODEL = esp32s3
3+
FEATURES_PROVIDED += esp_spi_ram
4+
5+
# common board and CPU features
6+
include $(RIOTBOARD)/common/esp32s3/Makefile.features
7+
8+
# peripherals provided by the board
9+
FEATURES_PROVIDED += periph_adc
10+
FEATURES_PROVIDED += periph_i2c
11+
FEATURES_PROVIDED += periph_pwm
12+
FEATURES_PROVIDED += periph_spi
13+
FEATURES_PROVIDED += periph_usbdev
14+
15+
# other features provided by the board
16+
FEATURES_PROVIDED += esp_jtag
17+
FEATURES_PROVIDED += highlevel_stdio
18+
FEATURES_PROVIDED += tinyusb_device
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# The board uses a ESP32-S3 with a 16MB QSPI Flash and a 8MB QSPI PSRAM
2+
FLASH_SIZE ?= 16
3+
4+
PORT_LINUX ?= /dev/ttyACM0
5+
6+
OPENOCD_CONFIG ?= board/esp32s3-builtin.cfg
7+
8+
include $(RIOTBOARD)/common/esp32s3/Makefile.include

boards/esp32s3-seeedstudio/doc.txt

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Copyright (C) 2024 Isikcan 'Jon' Yilmaz
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
/**
10+
* @defgroup boards_esp32s3_seeedstudio ESP32 Seeed Studio XIAO Board
11+
* @ingroup boards_esp32s3
12+
* @brief Support for the Seeed Studio Xiao ESP32S3
13+
* @author Isikcan 'Jon' Yilmaz <[email protected]>
14+
15+
\section esp32s3_seeedstudio Seeed Studio Xiao ESP32
16+
17+
## Table of Contents {#esp32s3_seeedstudio_toc}
18+
19+
1. [Overview](#esp32s3_seeedstudio_overview)
20+
2. [Hardware](#esp32s3_seeedstudio_hardware)
21+
1. [MCU](#esp32s3_seeedstudio_mcu)
22+
2. [Board Configuration](#esp32s3_seeedstudio_board_configuration)
23+
3. [Board Pinout](#esp32s3_seeedstudio_pinout)
24+
3. [Flashing the Device](#esp32s3_seeedstudio_flashing)
25+
4. [Using STDIO](#esp32s3_seeedstudio_stdio)
26+
27+
## Overview {#esp32s3_seeedstudio_overview}
28+
29+
The Seeed Studio ESP32S3 is one of the ESP32-S3 boards from Seeed Studio.
30+
\image html https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/img/xiaoesp32s3.jpg "Seeed Studio ESP32S3" width=800px
31+
32+
Vendor's info page for the board [here](https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/)
33+
34+
The main features of the board are:
35+
36+
- ESP32-S3 SoC with 2.4 GHz WiFi 802.11b/g/n and Bluetooth5, BLE
37+
- 8 MByte Flash
38+
- 8 MByte QSPI RAM
39+
- Native USB and USB Serial JTAG
40+
- 21 x 17.8 mm footprint
41+
42+
[Back to table of contents](#esp32s3_seeedstudio_toc)
43+
44+
## Hardware {#esp32s3_seeedstudio_hardware}
45+
46+
This section describes
47+
48+
- the [MCU](#esp32s3_seeedstudio_mcu),
49+
- the default [board configuration](#esp32s3_seeedstudio_board_configuration),
50+
- the [board pinout](#esp32s3_seeedstudio_pinout).
51+
52+
[Back to table of contents](#esp32s3_seeedstudio_toc)
53+
54+
### MCU {#esp32s3_seeedstudio_mcu}
55+
56+
Most features of the board are provided by the ESP32-S3 SoC. For detailed
57+
information about the ESP32-S3 SoC variant (family) and ESP32x SoCs,
58+
see section \ref esp32_mcu_esp32 "ESP32 SoC Series".
59+
60+
[Back to table of contents](#esp32s3_seeedstudio_toc)
61+
62+
### Board Configuration {#esp32s3_seeedstudio_board_configuration}
63+
64+
Seeed Studio Xiao ESP32S3 boards have no special hardware on board, besides a yellow LED connected to GPIO21.
65+
66+
The default board configuration provides:
67+
68+
- 9 x ADC
69+
- 1 x SPI
70+
- 1 x I2C
71+
- 1 x UART
72+
- 10 x PWM, 4 channels each
73+
74+
For detailed information about the peripheral configurations of ESP32-S3
75+
boards, see section \ref esp32_peripherals "Common Peripherals".
76+
77+
[Back to table of contents](#esp32s3_seeedstudio_toc)
78+
79+
### Board Pinout {#esp32s3_seeedstudio_pinout}
80+
81+
The following figure shows the pinout as configured by board definition (excluding the camera module).
82+
83+
@image html https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/img/2.jpg "Seeed Studio Xiao ESP32S3 Pinout" width=900px
84+
85+
The corresponding board schematic can be found
86+
[here](https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/res/XIAO_ESP32S3_SCH_v1.2.pdf)
87+
88+
[Back to table of contents](#esp32s3_seeedstudio_toc)
89+
90+
## Flashing the Device {#esp32s3_seeedstudio_flashing}
91+
92+
Since the board does not have a USB-to-Serial chip, the easiest way to flash
93+
the board is using the USB Serial/JTAG interface. Just connect the board to
94+
your host computer and use the following command:
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
BOARD=esp32s3-seeedstudio make flash ...
97+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98+
99+
@note Usually the make system resets the board before flashing to enable the
100+
USB Serial/JTAG interface. In some special cases this reset does not work so
101+
that the programmer cannot connect to the board and the flashing is aborted
102+
with a timeout:
103+
```
104+
Serial port /dev/ttyACM0
105+
Connecting...
106+
...
107+
serial.serialutil.SerialTimeoutException: Write timeout
108+
```
109+
This can happen for example if the board is not yet flashed with RIOT or the
110+
USB interface is used for another purpose. In this case, restart the board
111+
manually in download mode by pressing and releasing the RESET button while
112+
holding down the BOOT button. In download mode, the USB Serial/JTAG interface is
113+
always available.
114+
115+
For detailed information about ESP32-S3 as well as configuring and compiling
116+
RIOT for ESP32-S3 boards, see \ref esp32_riot.
117+
118+
[Back to table of contents](#esp32s3_seeedstudio_toc)
119+
120+
## Using STDIO {#esp32s3_seeedstudio_stdio}
121+
122+
Since the board does not have a USB-to-Serial chip, the USB Serial/JTAG
123+
interface is used by default for the STDIO (module `stdio_usb_serial_jtag`)
124+
which provides an USB CDC ACM interface.
125+
126+
If the USB port is used by the USBUS stack or the tinyUSB stack, implicitly
127+
the module `stdio_cdc_acm` or `stdio_tinyusb_cdc_acm` is used for the STDIO
128+
via the USB CDC ACM interface.
129+
130+
Alternatively, the UART interface could be used with an external USB-to-Serial
131+
adapter. Simply add `stdio_uart` to the list of used modules for this purpose:
132+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133+
BOARD=esp32s3-seeedstudio USEMODULE=stdio_uart make flash ...
134+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135+
136+
*/
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright (C) 2024 Isikcan 'Jon' Yilmaz
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_esp32s3_seeedstudio
11+
* @brief Board definitions for Seeed Studio Xiao ESP32S3 board
12+
* @{
13+
*
14+
* The board definitions in this file are valid for the Seeed Studio Xiao ESP32S3 board.
15+
*
16+
* Any modifications required for specific applications
17+
* can be overridden by \ref esp32_application_specific_configurations
18+
* "application-specific board configuration".
19+
*
20+
* @file
21+
* @author Isikcan 'Jon' Yilmaz <[email protected]>
22+
*/
23+
24+
#ifndef BOARD_H
25+
#define BOARD_H
26+
27+
#include <stdint.h>
28+
29+
/**
30+
* @name Button pin definitions
31+
* @{
32+
*/
33+
34+
/**
35+
* @brief Default button GPIO pin definition
36+
*
37+
* Seeed Studio Xiao ESP32S3 boards have a BOOT button connected to GPIO0, which can be
38+
* used as button during normal operation. Since the GPIO0 pin is pulled up,
39+
* the button signal is inverted, i.e., pressing the button will give a
40+
* low signal.
41+
*/
42+
#define BTN0_PIN GPIO0
43+
44+
/**
45+
* @brief Default button GPIO mode definition
46+
*
47+
* Since the GPIO of the button is pulled up with an external resistor, the
48+
* mode for the GPIO pin has to be GPIO_IN.
49+
*/
50+
#define BTN0_MODE GPIO_IN_PU
51+
52+
/**
53+
* @brief Default interrupt flank definition for the button GPIO
54+
*/
55+
#ifndef BTN0_INT_FLANK
56+
#define BTN0_INT_FLANK GPIO_FALLING
57+
#endif
58+
59+
/**
60+
* @brief Definition for compatibility with previous versions
61+
*/
62+
#define BUTTON0_PIN BTN0_PIN
63+
64+
/** @} */
65+
66+
/**
67+
* @name LED (on-board) configuration
68+
*
69+
* The Seeed Studio Xiao ESP32S3 board has one red LED connected to GPIO21.
70+
* @{
71+
*/
72+
/** @} */
73+
#ifndef LED0_PIN
74+
#define LED0_PIN GPIO21
75+
#define LED0_ACTIVE (0)
76+
#endif
77+
78+
/* include common board definitions as last step */
79+
#include "board_common.h"
80+
81+
#ifdef __cplusplus
82+
extern "C" {
83+
#endif
84+
85+
#ifdef __cplusplus
86+
} /* end extern "C" */
87+
#endif
88+
89+
#endif /* BOARD_H */
90+
/** @} */
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright (C) 2024 Isikcan 'Jon' Yilmaz
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
#ifndef GPIO_PARAMS_H
10+
#define GPIO_PARAMS_H
11+
12+
/**
13+
* @ingroup boards_esp32s3_seeedstudio
14+
* @brief Board specific configuration of direct mapped GPIOs
15+
* @file
16+
* @author Isikcan 'Jon' Yilmaz <[email protected]>
17+
* @{
18+
*/
19+
20+
#include "board.h"
21+
#include "saul/periph.h"
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
/**
28+
* @brief LED and Button configuration
29+
*/
30+
static const saul_gpio_params_t saul_gpio_params[] =
31+
{
32+
{
33+
.name = "BOOT",
34+
.pin = BTN0_PIN,
35+
.mode = BTN0_MODE,
36+
.flags = SAUL_GPIO_INVERTED
37+
},
38+
{
39+
.name = "LED",
40+
.pin = LED0_PIN,
41+
.mode = GPIO_OUT,
42+
.flags = SAUL_GPIO_INIT_CLEAR
43+
},
44+
};
45+
46+
#ifdef __cplusplus
47+
}
48+
#endif
49+
50+
#endif /* GPIO_PARAMS_H */
51+
/** @} */

0 commit comments

Comments
 (0)