-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When using a DMA SPI peripheral, there is no delay between the write and the reads, this leads to some configuration error. The MPU basically never goes into running mode and never sends the interrupt.
I could not pinpoint the exact problem, so I resorted to adding a delay before every write:
fn write(&mut self, reg: Register, val: u8, spi: &mut SPI) -> Result<(), E> {
self.ncs.set_low();
asm::delay(72_000_000 / 100 * 1);
spi.write(&[reg.write_address(), val])?;
self.ncs.set_high();
Ok(())
}This happens wether the SPI clock is a 200kHz or at 500kHz.
I am struggling to find which exact timing condition is violated in the datasheet.
Metadata
Metadata
Assignees
Labels
No labels