Skip to content

fix(firmware): clear onboard WS2812 LED on GPIO 48 (DevKitC-1 v1.1 / N16R8)#962

Open
dvcdsys wants to merge 1 commit into
ruvnet:mainfrom
dvcdsys:fix/onboard-led-gpio48
Open

fix(firmware): clear onboard WS2812 LED on GPIO 48 (DevKitC-1 v1.1 / N16R8)#962
dvcdsys wants to merge 1 commit into
ruvnet:mainfrom
dvcdsys:fix/onboard-led-gpio48

Conversation

@dvcdsys
Copy link
Copy Markdown

@dvcdsys dvcdsys commented Jun 6, 2026

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_strip handle 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

  • Device: ESP32-S3 N16R8 (16 MB flash, 8 MB PSRAM, QFN56 rev v0.2)
  • AP: 2.4 GHz WPA2 (bgn)
  • Result: bright RGB LED → off after flashing this build (visually confirmed). Same firmware flashed to 4 such boards. No regression expected on GPIO-38 boards (clearing 48 is a no-op there).

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

…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>
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