diff --git a/CHANGELOG.md b/CHANGELOG.md index 24540f58..dd0cb28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +* usb: On RM0455 and RM0468 parts, PA11/PA12 do not have an alternate function + (AF) for USB + ## [v0.15.0] 2023-10-09 * Remove unused `bitflags` dependency diff --git a/examples/usb_rtic.rs b/examples/usb_rtic.rs index 3e78f8be..19fe6273 100644 --- a/examples/usb_rtic.rs +++ b/examples/usb_rtic.rs @@ -70,7 +70,7 @@ mod app { #[cfg(any(feature = "rm0455", feature = "rm0468"))] let (pin_dm, pin_dp) = { let gpioa = ctx.device.GPIOA.split(ccdr.peripheral.GPIOA); - (gpioa.pa11.into_alternate(), gpioa.pa12.into_alternate()) + (gpioa.pa11, gpioa.pa12) }; let led = ctx.device.GPIOE.split(ccdr.peripheral.GPIOE).pe1; diff --git a/src/usb_hs.rs b/src/usb_hs.rs index 4aa0c959..26354e2f 100644 --- a/src/usb_hs.rs +++ b/src/usb_hs.rs @@ -18,7 +18,7 @@ use crate::rcc; use crate::stm32; -use crate::gpio::{self, Alternate, Speed}; +use crate::gpio::{self, Alternate, Analog, Speed}; use crate::time::Hertz; @@ -50,8 +50,8 @@ impl USB1 { usb_global: stm32::OTG1_HS_GLOBAL, usb_device: stm32::OTG1_HS_DEVICE, usb_pwrclk: stm32::OTG1_HS_PWRCLK, - _pin_dm: gpio::PA11>, - _pin_dp: gpio::PA12>, + _pin_dm: gpio::PA11, + _pin_dp: gpio::PA12, prec: rcc::rec::Usb1Otg, clocks: &rcc::CoreClocks, ) -> Self {