Merge pull request #4589 from tomaz-suller/feat-independent-nodiv

stm32/sai: make NODIV independent of MCKDIV
This commit is contained in:
Ulf Lilleengen 2025-08-26 10:47:40 +00:00 committed by GitHub
commit b6a81d8bed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## 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

View File

@ -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);
});