diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-09-10 21:18:23 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-10 21:18:23 +0000 |
| commit | 3534ee1bd5a15982d92c1034eabb283d56c5f3c9 (patch) | |
| tree | a1282e9b47cf19205fb796b03b3c5b65cd8ff586 | |
| parent | 2286e5da13b11f0cfc37e5345e3ed3c40f774055 (diff) | |
| parent | e698fbe598def25a1aa3e2a2625144817f2fa12d (diff) | |
Merge pull request #3326 from elagil/sai_pull_down_for_rx
SAI pull down clock and data lines in receive mode
| -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 | } |
