fix(firmware): clear onboard WS2812 LED on GPIO 48 (DevKitC-1 v1.1 / N16R8)#962
Open
dvcdsys wants to merge 1 commit into
Open
fix(firmware): clear onboard WS2812 LED on GPIO 48 (DevKitC-1 v1.1 / N16R8)#962dvcdsys wants to merge 1 commit into
dvcdsys wants to merge 1 commit into
Conversation
…N16R8) S3 dev boards wire the onboard WS2812 to GPIO 38 (DevKitC-1 v1.0) OR GPIO 48 (DevKitC-1 v1.1, N16R8 modules, generic YD-ESP32-S3 clones). app_main() only cleared GPIO 38, so on GPIO-48 boards the bright RGB LED stays lit after flashing. Clear every candidate GPIO on S3 (38 and 48); C6 unchanged (8). Each strip handle is created, cleared, then deleted to free its RMT channel. Pulsing a pin with no LED attached is harmless, and clearing 48 is a no-op on GPIO-38 boards. Co-Authored-By: claude-flow <ruv@ruv.net>
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.
Problem
On ESP32-S3 DevKitC-1 v1.1 / N16R8 modules / generic YD-ESP32-S3 clones, the onboard RGB (WS2812) LED stays lit at a bright color after flashing — the firmware never turns it off.
Root Cause
app_main()clears the onboard WS2812 on a single GPIO: 38 on S3, 8 on C6. But many S3 boards (DevKitC-1 v1.1, N16R8 modules, YD-ESP32-S3 clones) wire the WS2812 to GPIO 48, not 38. The clear targets the wrong pin, so the LED is left in its power-on state.Fix
Clear every candidate LED GPIO on S3 — both 38 and 48 (C6 unchanged at 8). Each
led_striphandle is created →led_strip_clear()→led_strip_del()so the RMT channel is freed. Driving a pin with no LED attached is a harmless reset pulse, and clearing 48 is a no-op on GPIO-38 boards.Verification
Risk
Minimal. One extra RMT create/clear/del on GPIO 48 at boot (~microseconds), then the handle is freed. No runtime cost after boot; no behavior change on boards whose LED is already on GPIO 38.
🤖 Generated with claude-flow