diff --git a/rp2040-hal/src/gpio.rs b/rp2040-hal/src/gpio.rs index 96dab87..03b7f9d 100644 --- a/rp2040-hal/src/gpio.rs +++ b/rp2040-hal/src/gpio.rs @@ -95,7 +95,13 @@ macro_rules! gpio { type Parts = Parts; fn split(self, pads: pac::$PADSX, sio: pac::SIO, resets: &mut pac::RESETS) -> Parts { - resets.reset.modify(|_, w| w.$gpiox().clear_bit()); + resets.reset.modify(|_, w| w.$gpiox().clear_bit().$padsx().clear_bit()); + while resets.reset_done.read().$gpiox().bit_is_clear() { + cortex_m::asm::delay(10); + } + while resets.reset_done.read().$padsx().bit_is_clear() { + cortex_m::asm::delay(10); + } Parts { _pads: pads, _sio: sio,