Skip to content

Commit

Permalink
gimlet-seq-server: use set_bytes not write_bytes for sequencing contr…
Browse files Browse the repository at this point in the history
…ol (#1930)

Fixes #1929

Since `write_bytes` uses the `Write` operation, we effectively clear the
A1 bit when setting the A0 bit. Using `set_bytes` uses a `BitSet`
operation, allowing us to set A0 while leaving A1 in place. The FPGA has
papered over this by ignoring the A1 bit while it is in A0.
  • Loading branch information
Aaron-Hartwig authored Nov 22, 2024
1 parent 0f2196e commit 38c0571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drv/gimlet-seq-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ impl<S: SpiServer> ServerImpl<S> {
// failing to sequence.
//
let a1 = Reg::PWR_CTRL::A1PWREN;
self.seq.write_bytes(Addr::PWR_CTRL, &[a1]).unwrap_lite();
self.seq.set_bytes(Addr::PWR_CTRL, &[a1]).unwrap_lite();

loop {
let mut status = [0u8];
Expand Down Expand Up @@ -779,7 +779,7 @@ impl<S: SpiServer> ServerImpl<S> {
// Onward to A0!
//
let a0 = Reg::PWR_CTRL::A0A_EN;
self.seq.write_bytes(Addr::PWR_CTRL, &[a0]).unwrap_lite();
self.seq.set_bytes(Addr::PWR_CTRL, &[a0]).unwrap_lite();

loop {
let mut status = [0u8];
Expand Down

0 comments on commit 38c0571

Please sign in to comment.