Add experimental ESP32-S3 support - #140
Open
cckilator wants to merge 3 commits into
Open
Conversation
Updated comments and formatting for clarity and consistency. Adjusted task handling for ESP32-S3 to avoid conflicts with native USB CDC driver.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a new
[esp32_s3]PlatformIO environment (s3_WS281x_RGB) targeting generic ESP32-S3 boards with native USB CDC (e.g. ESP32-S3-WROOM-1 dev boards).Three fixes were needed to get the native USB CDC serial port working reliably on this target:
while (!Serial) continue;could hang forever on S3, since native USB CDC can stay unopened if the host never performs the expected handshake. Bounded to a 3s timeout instead.Serial.println(): this diagnostic output could block indefinitely on native USB CDC before a host terminal actively opens/drains the port. Disabled on S3 the same way it's already disabled on S2.processSerialTaskmoved to core 0: pinning it to core 1 (as done for classic ESP32) conflicts with the native USB CDC driver's internal FreeRTOS task, causing a hang after a few seconds of runtime. Moving it to core 0 (alongsideprocessDataTask) fixes this, but starves the IDLE0 task since both tasks now share core 0 - which then triggers a Task Watchdog Timer abort/reboot loop after ~10s. Fixed by callingdisableCore0WDT()at the start ofsetup()on S3.Also uses the RMT NeoPixelBus driver (
NeoEsp32Rmt1Ws2812xMethod/NeoEsp32Rmt1Sk6812Method) since this fork of NeoPixelBus has no I2S driver implementation for ESP32-S3.Tested on a generic "ESP32-S3-WROOM-1" dev board (labeled "3S"), wired to a 722-LED WS2812B strip via its native USB port, running through HyperHDR over adalight/AWA protocol at 2000000 baud. No crashes or reboots observed after extended runtime (multiple hours, including a full host reboot).
Happy to adjust anything (naming, guard placement, etc.) to match project conventions.