embassy-rs / stm32-data

76 stars 116 forks source link

Missing register definitions for configuring USB OTG HS PHY (only for STM32U59x/5Ax/5Fx/5Gx) #519

Open wagcampbell opened 2 months ago

wagcampbell commented 2 months ago

I'm running into some issues getting USB OTG working for an STM32U59x part.

Unlike the other STM32U5 parts, there are a some additional steps required to configure this USB OTG HS for STM32U59x/5Ax/5Fx/5Gx. image image image

The stm32 hal is missing some register definitions: image image image

Also, while the OTG_FS and OTG_HS control and status registers (CSRs) are mostly the same, there are some differences. Based on what I've gathered, I expect this will mean a change to the embassy-usb-synopsys-otg crate.

I haven't been able to successfully get this working yet, so there may be some additional steps/changes.

Hopefully, I can manage to get this working and can follow up with more details.

MDr164 commented 2 weeks ago

I added the missing register definitions and added the extra clock to rcc. Last two bits are the setup sequence for these chips and potentially an addition to the synopsys otg crate. I'll try getting to that and testing on hardware (I got an STM32U5A5 for that) rather sooner then later.