We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb41956 commit 5045b06Copy full SHA for 5045b06
examples/spi-dma.rs
@@ -39,8 +39,11 @@ fn main() -> ! {
39
let stream = steams.4;
40
41
let gpiob = dp.GPIOB.split();
42
- let pb15 = gpiob.pb15.into_alternate().internal_pull_up(true);
43
- let pb13 = gpiob.pb13.into_alternate();
+
+ // Note. We set GPIO speed as VeryHigh to it corresponds to SPI frequency 3MHz.
44
+ // Otherwise it may lead to the 'wrong last bit in every received byte' problem.
45
+ let pb15 = gpiob.pb15.into_alternate().speed(Speed::VeryHigh).internal_pull_up(true);
46
+ let pb13 = gpiob.pb13.into_alternate().speed(Speed::VeryHigh);
47
48
let mode = Mode {
49
polarity: Polarity::IdleLow,
0 commit comments