File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ It provides two variants:
28
28
the UART peripheral. You should verify it runs at an acceptable frequency, by
29
29
either studying the datasheet & the hal code or using a logic analyzer. An
30
30
fx2 based one, commonly available under $10 works great for this.
31
+
31
32
- If the first led is always on, no matter what data you put in, your spi is
32
33
probably not setting the mosi line to low on idle (You can check with a multimeter).
33
34
It may also be a timing issue with the first bit being sent, this is the case
@@ -41,6 +42,14 @@ It provides two variants:
41
42
- Is everything white? This may stem from an spi peripheral that's too slow or
42
43
one that takes too much time in-between bytes
43
44
45
+ - Are you using the ` --release ` compiler flag?
46
+
47
+ The timing of each byte passed over SPI is very sensitive, and running code compiled
48
+ without full optimizations can throw off your timing. Always use either ` --release `
49
+ flag with your ` cargo <command> ` , or alternatively set ` [profile.dev] opt-level = "3" `
50
+ To ensure timing matches what your programmed. A dead giveaway of this is when all
51
+ pixels go full brightness for every color.
52
+
44
53
When opening an issue about wrong/strange data, it would help if you include
45
54
your code (of course) and a capture of MOSI & SCK from an oscilloscope/a logic
46
55
analyzer.
You can’t perform that action at this time.
0 commit comments