Skip to content

Commit 450b019

Browse files
committed
add info on required compiler optimization level
1 parent f57ad02 commit 450b019

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ It provides two variants:
4141
- Is everything white? This may stem from an spi peripheral that's too slow or
4242
one that takes too much time in-between bytes
4343

44+
- are you using the `--release` compiler flag?
45+
46+
The timing of each byte passed over SPI is very sensitive, and running code compiled
47+
without full optimizations can throw off your timing. Always use either `--release`
48+
flag with your `cargo <command>`, or alternatively set `[profile.dev] opt-level = "3"`
49+
To ensure timing matches what your programmed. A dead giveaway of this is when all
50+
pixels go full brightness for every color.
51+
4452
When opening an issue about wrong/strange data, it would help if you include
4553
your code (of course) and a capture of MOSI & SCK from an oscilloscope/a logic
4654
analyzer.

0 commit comments

Comments
 (0)