stm32-rs / synopsys-usb-otg

usb-device implementation for Synopsys USB OTG IP cores
MIT License
41 stars 29 forks source link

Add product_id value = 0x0000_2300 (used on STM32H7) #4

Closed richardeoin closed 4 years ago

richardeoin commented 4 years ago

As found in the core_id register. This is enough to get the H7 working with the usbd-serial CDC-ACM implementation.

The main differences between this revision and 0x0000_2100:

Neither of those features are used in this crate, so there's no changes to make.

Disasm commented 4 years ago

Thank you! Glad to hear this works :)

As for https://github.com/stm32-rs/stm32h7xx-hal/pull/108, since we do not use steal() anymore, it's easy to use an arbitrary address for the peripheral (already available as USB::REGISTERS). Constants in the ral module will need a fix too, though.

https://github.com/stm32-rs/synopsys-usb-otg/blob/594df5d77732717320591c17ab912dc38cbe07f4/src/target.rs#L67-L76

richardeoin commented 4 years ago

Thanks! I saw USB::REGISTERS but also that it wasn't used anywhere, whilst the constants in the ral are.

Disasm commented 4 years ago

@richardeoin I fixed this in the use-usb-registers branch. Could you check how it works with your board?