fix h7 sai example start sequence

This commit is contained in:
vinsynth 2025-05-05 17:32:38 -04:00
parent 6034b17728
commit 57938d1174

View File

@ -112,8 +112,10 @@ async fn main(_spawner: Spawner) {
let mut buf = [0u32; HALF_DMA_BUFFER_LENGTH];
loop {
sai_receiver.read(&mut buf).await.unwrap();
// write() must be called before read() to start the master (transmitter)
// clock used by the receiver
sai_transmitter.write(&buf).await.unwrap();
sai_receiver.read(&mut buf).await.unwrap();
}
}