diff options
| author | elagil <[email protected]> | 2024-09-10 21:33:31 +0200 |
|---|---|---|
| committer | elagil <[email protected]> | 2024-09-10 21:38:05 +0200 |
| commit | e698fbe598def25a1aa3e2a2625144817f2fa12d (patch) | |
| tree | 0d5e1a160fee50441ac8bc46e0addb17b6c7452d | |
| parent | b8fa5cdf06f54cda1895b6d5e8d3b436dbce08ac (diff) | |
fix: pull-down clock/data lines for receive
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index 6bf184dd8..63f48ace0 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -661,12 +661,12 @@ fn get_af_types(mode: Mode, tx_rx: TxRx) -> (AfType, AfType) { | |||
| 661 | //sd is defined by tx/rx mode | 661 | //sd is defined by tx/rx mode |
| 662 | match tx_rx { | 662 | match tx_rx { |
| 663 | TxRx::Transmitter => AfType::output(OutputType::PushPull, Speed::VeryHigh), | 663 | TxRx::Transmitter => AfType::output(OutputType::PushPull, Speed::VeryHigh), |
| 664 | TxRx::Receiver => AfType::input(Pull::None), | 664 | TxRx::Receiver => AfType::input(Pull::Down), // Ensure mute level when no input is connected. |
| 665 | }, | 665 | }, |
| 666 | //clocks (mclk, sck and fs) are defined by master/slave | 666 | //clocks (mclk, sck and fs) are defined by master/slave |
| 667 | match mode { | 667 | match mode { |
| 668 | Mode::Master => AfType::output(OutputType::PushPull, Speed::VeryHigh), | 668 | Mode::Master => AfType::output(OutputType::PushPull, Speed::VeryHigh), |
| 669 | Mode::Slave => AfType::input(Pull::None), | 669 | Mode::Slave => AfType::input(Pull::Down), // Ensure no clocks when no input is connected. |
| 670 | }, | 670 | }, |
| 671 | ) | 671 | ) |
| 672 | } | 672 | } |
