From a498bf11af2768b7aca24c3d84d4dfa20711c593 Mon Sep 17 00:00:00 2001 From: Caleb Jamison Date: Tue, 24 Sep 2024 18:45:20 -0400 Subject: [PATCH] Disable pad isolation on PWM A pins. Also fixes minor bug for 2040 where A pins didn't have their pull up/down enabled. --- embassy-rp/src/pwm.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/embassy-rp/src/pwm.rs b/embassy-rp/src/pwm.rs index 7da3dccb0..9ba3a2be3 100644 --- a/embassy-rp/src/pwm.rs +++ b/embassy-rp/src/pwm.rs @@ -106,6 +106,12 @@ impl<'d> Pwm<'d> { if let Some(pin) = &a { pin.gpio().ctrl().write(|w| w.set_funcsel(4)); + pin.pad_ctrl().modify(|w| { + #[cfg(feature = "_rp235x")] + w.set_iso(false); + w.set_pue(b_pull == Pull::Up); + w.set_pde(b_pull == Pull::Down); + }); } if let Some(pin) = &b { pin.gpio().ctrl().write(|w| w.set_funcsel(4));