Skip to content

Add experimental ESP32-S3 support - #140

Open
cckilator wants to merge 3 commits into
awawa-dev:masterfrom
cckilator:esp32-s3-support
Open

Add experimental ESP32-S3 support#140
cckilator wants to merge 3 commits into
awawa-dev:masterfrom
cckilator:esp32-s3-support

Conversation

@cckilator

Copy link
Copy Markdown

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:

  1. Bounded serial wait: 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.
  2. Disabled early 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.
  3. processSerialTask moved 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 (alongside processDataTask) 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 calling disableCore0WDT() at the start of setup() 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.

Updated comments and formatting for clarity and consistency. Adjusted task handling for ESP32-S3 to avoid conflicts with native USB CDC driver.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant