Skip to content

Commit

Permalink
Test continuous xfer-then-read behavior
Browse files Browse the repository at this point in the history
When we change the transmit / receive masks within a continuous
transaction, we might demonstrate an LPSPI hardware defect. In the
example shown here, the LPSPI SCK stalls when transmitting the final bit
of the final byte, preventing the read from executing.

Right now, I'm not sure if this is the LPSPI continuous transaction
hardware defect, or if there's an issue in this new driver. I'll shoot
for a deeper review later.
  • Loading branch information
mciantyre committed Jun 10, 2024
1 parent ba79054 commit 18ee597
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/rtic_spi_blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,22 @@ mod app {

delay();
}

{
use eh1::spi::{
Operation::{Read, TransferInPlace},
SpiDevice,
};

let mut read = [0u8; 7];
let mut xfer = [0u8; 16];
for idx in 0..xfer.len() {
xfer[idx] = idx as u8;
}

spi.transaction(&mut [TransferInPlace(&mut xfer), Read(&mut read)])
.unwrap();
}
}
}
}

0 comments on commit 18ee597

Please sign in to comment.