-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards/adafruit-itsybitsy-m4: turn off APA102 LED on startup #19357
boards/adafruit-itsybitsy-m4: turn off APA102 LED on startup #19357
Conversation
549caa6
to
562da97
Compare
562da97
to
a55db80
Compare
Does this still work with LTO? It looks like the overhead of a function call is enough to not have the SPI clock too high, but wit LTO enabled the SPI clock may be well out of spec. |
Yes I tried with
and the LED still gets turned off. |
a55db80
to
23adb1a
Compare
I'm still worried that optimization in the GPIO driver might result in timing issues. But if you add a comment to ease debugging in case this indeed happens, I'm fine with the ostrich algorithm on SPI clock generation here :) |
23adb1a
to
ff7227d
Compare
bors merge |
Build succeeded: |
Contribution description
adafruit-itsybitsy-m4
comes with a serial APA102 that is left on by the bootloader.It's really bright and the only way to turn it off is by communication with it through it's SPI interface.
We have a proper driver for it, but pulling that in unconditionally feels wrong.
Instead just bit-bang the simple protocol on startup set all colors + alpha to 0.
Testing procedure
adafruit-itsybitsy-m4
no longer glows blindingly pink.tests/driver_apa102
still does it's fadingIssues/PRs references