aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2025-08-26 10:47:40 +0000
committerGitHub <[email protected]>2025-08-26 10:47:40 +0000
commitb6a81d8bedeafa5166d0668c387ed65062777193 (patch)
treee2ff085811f5ad30de059f802a5698c8fb54bf81
parent7b8484f49290f988389e339e349e6825cc20ac41 (diff)
parent0203b2b257df4f352191f85ff65a22041612affe (diff)
Merge pull request #4589 from tomaz-suller/feat-independent-nodiv
stm32/sai: make NODIV independent of MCKDIV
-rw-r--r--embassy-stm32/CHANGELOG.md1
-rw-r--r--embassy-stm32/src/sai/mod.rs4
2 files changed, 4 insertions, 1 deletions
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
8<!-- next-header --> 8<!-- next-header -->
9## Unreleased - ReleaseDate 9## Unreleased - ReleaseDate
10 10
11- feat: stm32/sai: make NODIV independent of MCKDIV
11- fix: stm32/sai: fix WB MCKDIV 12- fix: stm32/sai: fix WB MCKDIV
12- fix: stm32/i2c: pull-down was enabled instead of pull-none when no internal pull-up was needed. 13- fix: stm32/i2c: pull-down was enabled instead of pull-none when no internal pull-up was needed.
13- feat: Improve blocking hash speed 14- 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 {
602 pub clock_strobe: ClockStrobe, 602 pub clock_strobe: ClockStrobe,
603 pub output_drive: OutputDrive, 603 pub output_drive: OutputDrive,
604 pub master_clock_divider: MasterClockDivider, 604 pub master_clock_divider: MasterClockDivider,
605 pub nodiv: bool,
605 pub is_high_impedance_on_inactive_slot: bool, 606 pub is_high_impedance_on_inactive_slot: bool,
606 pub fifo_threshold: FifoThreshold, 607 pub fifo_threshold: FifoThreshold,
607 pub companding: Companding, 608 pub companding: Companding,
@@ -631,6 +632,7 @@ impl Default for Config {
631 frame_sync_definition: FrameSyncDefinition::ChannelIdentification, 632 frame_sync_definition: FrameSyncDefinition::ChannelIdentification,
632 frame_length: 32, 633 frame_length: 32,
633 master_clock_divider: MasterClockDivider::MasterClockDisabled, 634 master_clock_divider: MasterClockDivider::MasterClockDisabled,
635 nodiv: false,
634 clock_strobe: ClockStrobe::Rising, 636 clock_strobe: ClockStrobe::Rising,
635 output_drive: OutputDrive::Immediately, 637 output_drive: OutputDrive::Immediately,
636 is_high_impedance_on_inactive_slot: false, 638 is_high_impedance_on_inactive_slot: false,
@@ -900,7 +902,7 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> {
900 w.set_mono(config.stereo_mono.mono()); 902 w.set_mono(config.stereo_mono.mono());
901 w.set_outdriv(config.output_drive.outdriv()); 903 w.set_outdriv(config.output_drive.outdriv());
902 w.set_mckdiv(config.master_clock_divider.mckdiv().into()); 904 w.set_mckdiv(config.master_clock_divider.mckdiv().into());
903 w.set_nodiv(config.master_clock_divider == MasterClockDivider::MasterClockDisabled); 905 w.set_nodiv(config.nodiv);
904 w.set_dmaen(true); 906 w.set_dmaen(true);
905 }); 907 });
906 908