stm32-rs / stm32h7xx-hal

Peripheral access API for STM32H7 series microcontrollers
BSD Zero Clause License
210 stars 99 forks source link

usb_passthrough example does not compile due to broken USB2 implementation #417

Open cosmikwolf opened 1 year ago

cosmikwolf commented 1 year ago

When I try to run the example passthrough, it does not compile. I have in fact not been able to get the USB2OTG peripheral to work at all.

I am wondering if there is a working example out there where USB2 is working using this library?

cargo run --features="stm32h750v usb_hs rm0399" --example usb_passthrough

error: Cannot not select both rm0433 and rm0399
   --> src/lib.rs:131:1
    |
131 | compile_error!("Cannot not select both rm0433 and rm0399");
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cosmikwolf commented 1 year ago

Here is an example where I try and implement USB2. This example compiles and runs, however I am not able to use the USB2 port on an STM32H750v dev board https://gist.github.com/cosmikwolf/f2ff77bc6e4d32e7ef8b07f859c6185d

mattico commented 1 year ago

When you enable the chip feature stm32h750v it enables the appropriate rmXXXX feature automatically. So, remove the rm0399 feature. Is there a reason that you added that feature?