diff --git a/embassy-stm32/CHANGELOG.md b/embassy-stm32/CHANGELOG.md index 1e9e59231..82a253ff6 100644 --- a/embassy-stm32/CHANGELOG.md +++ b/embassy-stm32/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased - ReleaseDate +- feat: stm32/sai: make NODIV independent of MCKDIV - fix: stm32/sai: fix WB MCKDIV - fix: stm32/i2c: pull-down was enabled instead of pull-none when no internal pull-up was needed. - feat: Improve blocking hash speed diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index a42b0c350..4965f8b04 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs @@ -602,6 +602,7 @@ pub struct Config { pub clock_strobe: ClockStrobe, pub output_drive: OutputDrive, pub master_clock_divider: MasterClockDivider, + pub nodiv: bool, pub is_high_impedance_on_inactive_slot: bool, pub fifo_threshold: FifoThreshold, pub companding: Companding, @@ -631,6 +632,7 @@ impl Default for Config { frame_sync_definition: FrameSyncDefinition::ChannelIdentification, frame_length: 32, master_clock_divider: MasterClockDivider::MasterClockDisabled, + nodiv: false, clock_strobe: ClockStrobe::Rising, output_drive: OutputDrive::Immediately, is_high_impedance_on_inactive_slot: false, @@ -900,7 +902,7 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> { w.set_mono(config.stereo_mono.mono()); w.set_outdriv(config.output_drive.outdriv()); w.set_mckdiv(config.master_clock_divider.mckdiv().into()); - w.set_nodiv(config.master_clock_divider == MasterClockDivider::MasterClockDisabled); + w.set_nodiv(config.nodiv); w.set_dmaen(true); });