-
I've been doing board bringup on the Model 100's PCB. One of the things that has been biting me is that one of the 32 RGB LEDs just won't turn on its red phosphor.
-
My first thought is a layout or soldering issue. After much debugging, everything looks fine on that front. I have continuity from the source to the LED's red pin.
-
Next up, I realize it was the "last" LED logically. And the LED driver uses BGR ordering. So maybe it is an off-by-one error in my driver code. I hack up the code to grow the buffer and light up a 33rd LED. Still no red.
-
Hm. Maybe it's the code that filled the buffer with LED color data. So I invert the reader code to suck the pixels out of the buffer as RGB instead of BGR. No love.
-
I pull out a second copy of the circuit board and flash the not-hacked-up firmware onto it. Still broken. No red phosphor on that same LED.
-
Maybe it really *is* a hardware failure.
-
I flash the hacked up firmware that tries to light up a 33rd LED. Every LED's red phosphor is now lit.
-
!@!#$@$@!%
-
I reread my code.
-
It's a bug in my state machine. It is an off by one error in the initialization of my state machine. I am skipping green on the *first* LED. Since I'm initializing the LEDs to white (0xff,0xff,0xff), the problem manifests as "no red" on the last LED.
-
I fix the bug and clean up all my hacky debugging code. I verify that everything looks great on the new board. I commit. I plug in the original board and flash the corrected firmware, happy that I've solved this mystery.
-
It does not work.
-
It turns out that the red phosphor on that LED on the original board is burned out. Probably by me. Probably during one of my first debugging steps.
-
🤦♂️
-
I have no idea what the moral of this story is.