drv/rgbled: disconnect SPIM SCK to free mcu-led3 on DotBot v3 bd1.3+#19
Merged
Merged
Conversation
The historical SCK pin (P1.06) became wired to mcu-led3 (D24) starting at DotBot v3 board build 1.3, causing the LED to stay lit whenever db_rgbled_init() ran. SCK is unused by the TLC5973 protocol anyway (MOSI carries everything). Verified against DotBots/DotBot-hardware tags v1.4-v2.1.0 that P1.06 has no consumer on DotBot v2 or v3 <=bd1.2, so the change is strictly safer on every revision. AI-assisted: Claude Opus 4.7
AI-assisted: Claude Opus 4.7
This was referenced May 19, 2026
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
db_rgbled_init()claimsP1.06as the SPIM SCK output for the TLC5973D one-wire driver. On DotBot v3 board build 1.3+ (perbd1.3achangelog: "added 2 more LEDs on the MCU"),P1.06is wired tomcu-led3(D24). Because SPIM SCK idles HIGH, that LED stays permanently lit any time the driver is initialized.Fix
SCK is not electrically required by the TLC5973D protocol (it's a one-wire driver — only the MOSI pulse widths carry data; SPIM's internal serializer still runs fine without an exposed SCK pin). Configure
PSEL.SCKas Disconnected and drop the_sck_pinconstant + itsdb_gpio_initcall.Cross-board safety
Verified against the
DotBots/DotBot-hardwaretag history:v1.4-v1.8.2, nRF52840 era):P1.06has no consumer in the schematic. Old driver was harmless there; new driver is identical.v2.0.0-v2.1.0, nRF5340 era pre-LED3): same —P1.06exists as a global net label but no LED/peripheral wired to it.P1.06ismcu-led3. This is the case the fix targets.So the change is strictly safer on every revision.
Validated
gcc-arm-none-eabi15.2.1 withclang-format --dry-run --Werror.mcu-led3no longer lights up while the blue RGB heartbeat continues to blink normally.Plus inline comments in
rgbled.c: a paragraph in the file header explaining the WS2812-style SPIM-MOSI-as-NRZ-pulse-generator trick (since the technique surprises every first reader), and a short comment at thePSEL.SCKline explaining why disconnecting is safe.