Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb: On rm0455/rm0468 parts, pins PA11/PA12 do not have an alternate function for USB #464

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

* Bugfix, usb: On RM0455 and RM0468 parts, PA11/PA12 do not have an alternate function
(AF) for USB. Use `into_analog()` when passing pins to `USB1/2::new` on these parts [#464]

## [v0.15.0] 2023-10-09

* Remove unused `bitflags` dependency
Expand Down Expand Up @@ -385,3 +388,4 @@
[#451]: https://github.com/stm32-rs/stm32h7xx-hal/pull/451
[#453]: https://github.com/stm32-rs/stm32h7xx-hal/pull/453
[#456]: https://github.com/stm32-rs/stm32h7xx-hal/pull/456
[#464]: https://github.com/stm32-rs/stm32h7xx-hal/pull/464
2 changes: 1 addition & 1 deletion examples/usb_rtic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/usb_hs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use crate::rcc;
use crate::stm32;

use crate::gpio::{self, Alternate, Speed};
use crate::gpio::{self, Alternate, Analog, Speed};

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h743)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h743)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h743v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h743v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-semihost)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-semihost)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h747cm7)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h747cm7)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h753v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h753v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-rtt)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-rtt)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-itm)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / ci (stm32h743v, log-itm)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h753)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (stable, stm32h753)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h743)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h743)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h743v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h743v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h753v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h753v)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h753)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h753)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h747cm7)

unused import: `Analog`

Check warning on line 21 in src/usb_hs.rs

View workflow job for this annotation

GitHub Actions / check (1.65.0, stm32h747cm7)

unused import: `Analog`

use crate::time::Hertz;

Expand Down Expand Up @@ -50,8 +50,8 @@
usb_global: stm32::OTG1_HS_GLOBAL,
usb_device: stm32::OTG1_HS_DEVICE,
usb_pwrclk: stm32::OTG1_HS_PWRCLK,
_pin_dm: gpio::PA11<Alternate<10>>,
_pin_dp: gpio::PA12<Alternate<10>>,
_pin_dm: gpio::PA11<Analog>,
_pin_dp: gpio::PA12<Analog>,
prec: rcc::rec::Usb1Otg,
clocks: &rcc::CoreClocks,
) -> Self {
Expand Down
Loading