-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/esp32s3-seeedstudio: Seeedstudio xiao esp32s3 board support #20973
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
base: master
Are you sure you want to change the base?
boards/esp32s3-seeedstudio: Seeedstudio xiao esp32s3 board support #20973
Conversation
38765d8
to
1285c4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty straightforward!
For the naming, I'd go with esp32s3-seeedstudio-xiao
, acknowledging that esp somehow has it's own naming scheme going on, but allowing for future esp32s3 boards by seeedstudio.
/** TODO all gpios are pwm in seeed esp32s3 | ||
* @brief Declaration of the channels for device PWM_DEV(0), | ||
* at maximum PWM_CHANNEL_NUM_DEV_MAX. | ||
*/ | ||
// #ifndef PWM0_GPIOS | ||
// #define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15, GPIO16 } | ||
// #endif | ||
|
||
/** | ||
* @brief Declaration of the channels for device PWM_DEV(1), | ||
* at maximum PWM_CHANNEL_NUM_DEV_MAX. | ||
*/ | ||
// #ifndef PWM1_GPIOS | ||
// #define PWM1_GPIOS { GPIO6, GPIO7, GPIO21, GPIO38 } | ||
// #endif | ||
|
||
/** @} */ | ||
|
||
/** | ||
* @name SPI configuration | ||
* | ||
* @note The GPIOs listed in the configuration are first initialized as SPI | ||
* signals when the corresponding SPI interface is used for the first time | ||
* by either calling the `spi_init_cs` function or the `spi_acquire` | ||
* function. That is, they are not allocated as SPI signals before and can | ||
* be used for other purposes as long as the SPI interface is not used. | ||
* @{ TODO SPI pins | ||
*/ | ||
// #ifndef SPI0_CTRL | ||
// #define SPI0_CTRL FSPI /**< FSPI is used as SPI_DEV(0) */ | ||
// #endif | ||
// #ifndef SPI0_SCK | ||
// #define SPI0_SCK GPIO36 /**< FSPI SCK (pin FSPICLK) */ | ||
// #endif | ||
// #ifndef SPI0_MISO | ||
// #define SPI0_MISO GPIO37 /**< FSPI MISO (pin FSPIQ) */ | ||
// #endif | ||
// #ifndef SPI0_MOSI | ||
// #define SPI0_MOSI GPIO35 /**< FSPI MOSI (pin FSPID) */ | ||
// #endif | ||
// #ifndef SPI0_CS0 | ||
// #define SPI0_CS0 GPIO34 /**< FSPI CS0 (pin FSPICS0) */ | ||
// #endif | ||
/** @} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either define them or remove them 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to define them at least for the SPI what schouldn't be a problem.
#define SPI0_SCK GPIO7
...
#define SPI0_MISO GPIO8
...
#define SPI0_MOSI GPIO9
...
#define SPI0_CS0 <any available GPIO, e.g. GPIO3 (D2/A2)>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since GPIO3 (D2/A2) is also used for the SD Card Expansion port, it makes sense to use GPIO3
also for SPI0_CS0
. This ensures that the SD Card Expansion Board works with with our sdcard_spi
driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you define them, the doc.txt would need to be adapted to reflect the pins that are actually usable from RIOT with the default configuration.
* at maximum PWM_CHANNEL_NUM_DEV_MAX. | ||
*/ | ||
// #ifndef PWM0_GPIOS | ||
// #define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15, GPIO16 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some or at least the USER LED pin GPIO21 should be defined as PWM channel.
According to https://github.com/RIOT-OS/RIOT/blob/master/doc/memos/rdm0003.md, I'd rather go with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, much appreciated! 🎉 some comments below
* @brief Support for the Seeed Studio Xiao ESP32S3 | ||
* @author Isikcan 'Jon' Yilmaz <[email protected]> | ||
|
||
\section esp32s3_seeedstudio Seeed Studio Xiao ESP32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\section esp32s3_seeedstudio Seeed Studio Xiao ESP32 | |
\section esp32s3_seeedstudio Seeed Studio Xiao ESP32S3 |
?
/** TODO all gpios are pwm in seeed esp32s3 | ||
* @brief Declaration of the channels for device PWM_DEV(0), | ||
* at maximum PWM_CHANNEL_NUM_DEV_MAX. | ||
*/ | ||
// #ifndef PWM0_GPIOS | ||
// #define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15, GPIO16 } | ||
// #endif | ||
|
||
/** | ||
* @brief Declaration of the channels for device PWM_DEV(1), | ||
* at maximum PWM_CHANNEL_NUM_DEV_MAX. | ||
*/ | ||
// #ifndef PWM1_GPIOS | ||
// #define PWM1_GPIOS { GPIO6, GPIO7, GPIO21, GPIO38 } | ||
// #endif | ||
|
||
/** @} */ | ||
|
||
/** | ||
* @name SPI configuration | ||
* | ||
* @note The GPIOs listed in the configuration are first initialized as SPI | ||
* signals when the corresponding SPI interface is used for the first time | ||
* by either calling the `spi_init_cs` function or the `spi_acquire` | ||
* function. That is, they are not allocated as SPI signals before and can | ||
* be used for other purposes as long as the SPI interface is not used. | ||
* @{ TODO SPI pins | ||
*/ | ||
// #ifndef SPI0_CTRL | ||
// #define SPI0_CTRL FSPI /**< FSPI is used as SPI_DEV(0) */ | ||
// #endif | ||
// #ifndef SPI0_SCK | ||
// #define SPI0_SCK GPIO36 /**< FSPI SCK (pin FSPICLK) */ | ||
// #endif | ||
// #ifndef SPI0_MISO | ||
// #define SPI0_MISO GPIO37 /**< FSPI MISO (pin FSPIQ) */ | ||
// #endif | ||
// #ifndef SPI0_MOSI | ||
// #define SPI0_MOSI GPIO35 /**< FSPI MOSI (pin FSPID) */ | ||
// #endif | ||
// #ifndef SPI0_CS0 | ||
// #define SPI0_CS0 GPIO34 /**< FSPI CS0 (pin FSPICS0) */ | ||
// #endif | ||
/** @} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you define them, the doc.txt would need to be adapted to reflect the pins that are actually usable from RIOT with the default configuration.
/** | ||
* @name Camera configurations and pins | ||
* TODO also mic pins | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @name Camera configurations and pins | |
* TODO also mic pins | |
*/ |
The board doesn't have those, right?
sorry folks, maybe this PR was more premature than i thought. |
No worries, nothing wrong with getting feedback early |
…ostly copied from esp32s3-pros3 board files.
1285c4c
to
5ded807
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IsikcanYilmaz I can give this a test soon (the hardware will arrive this week). Perhaps you can use #21267 for orientation for the last remaining tasks.
For the time being I gave this an initial review which addresses some things that were present in #21267 as well.
You can also follow the guide in #21220 and change the doc.txt
to the new Markdown format.
# other features provided by the board | ||
FEATURES_PROVIDED += esp_jtag | ||
FEATURES_PROVIDED += highlevel_stdio | ||
FEATURES_PROVIDED += tinyusb_device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FEATURES_PROVIDED += tinyusb_device | |
FEATURES_PROVIDED += tinyusb_device | |
FEATURES_PROVIDED += xiao_shield | |
PR #20980 will introduce the xiao_shield
feature, which applies to this PR as well. You'll have to wait before adding this until the PR is merged. Otherwise you will get a Make error.
1. [Overview](#esp32s3_seeedstudio_overview) | ||
2. [Hardware](#esp32s3_seeedstudio_hardware) | ||
1. [MCU](#esp32s3_seeedstudio_mcu) | ||
2. [Board Configuration](#esp32s3_seeedstudio_board_configuration) | ||
3. [Board Pinout](#esp32s3_seeedstudio_pinout) | ||
3. [Flashing the Device](#esp32s3_seeedstudio_flashing) | ||
4. [Using STDIO](#esp32s3_seeedstudio_stdio) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. [Overview](#esp32s3_seeedstudio_overview) | |
2. [Hardware](#esp32s3_seeedstudio_hardware) | |
1. [MCU](#esp32s3_seeedstudio_mcu) | |
2. [Board Configuration](#esp32s3_seeedstudio_board_configuration) | |
3. [Board Pinout](#esp32s3_seeedstudio_pinout) | |
3. [Flashing the Device](#esp32s3_seeedstudio_flashing) | |
4. [Using STDIO](#esp32s3_seeedstudio_stdio) | |
-# [Overview](#esp32s3_seeedstudio_overview) | |
-# [Hardware](#esp32s3_seeedstudio_hardware) | |
-# [MCU](#esp32s3_seeedstudio_mcu) | |
-# [Board Configuration](#esp32s3_seeedstudio_board_configuration) | |
-# [Board Pinout](#esp32s3_seeedstudio_pinout) | |
-# [Flashing the Device](#esp32s3_seeedstudio_flashing) | |
-# [Using STDIO](#esp32s3_seeedstudio_stdio) |
Doxygen supports automatic numbering of the tables. That makes it a lot easier to add or remove elements later on because it's not required to renumber everything.
# The board uses a ESP32-S3 with a 16MB QSPI Flash and a 8MB QSPI PSRAM | ||
FLASH_SIZE ?= 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specifications say it has 8MB of QSPI Flash: https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/#specification
* Since the GPIO of the button is pulled up with an external resistor, the | ||
* mode for the GPIO pin has to be GPIO_IN. | ||
*/ | ||
#define BTN0_MODE GPIO_IN_PU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define BTN0_MODE GPIO_IN_PU | |
#define BTN0_MODE GPIO_IN |
See #21267 (comment)
/** | ||
* @name I2C configuration | ||
* | ||
* For generic boards, only one I2C interface I2C_DEV(0) is defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be adapted for the Xiao specifically.
#endif | ||
|
||
/** | ||
* @name ADC and DAC channel configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @name ADC and DAC channel configuration | |
* @name ADC channel configuration |
The ESP32S3 does not have a DAC.
* ESP32-S3 provides 3 UART interfaces at maximum: | ||
* | ||
* UART_DEV(0) uses fixed standard configuration.<br> | ||
* UART_DEV(1) is not used.<br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* UART_DEV(1) is not used.<br> | |
* UART_DEV(1) is not used.<br> | |
* UART_DEV(2) is not used.<br> |
For completeness.
The Xiao-ESP32S3 arrived today and I gave it a quick test with some tests: The
The
|
Indeed, this was caused by USBipd. On my Linux ThinkPad, the data looks absolutely fine. |
Contribution description
Support for the tiny, barebones board "Seeed Studio Xiao ESP32S3"
Mostly based on the esp32s3-pros3 board
Testing procedure