Re: Has anyone used the USB HS port used as a USB FS on STM32F4?
Li, Jun R
The OTG_HS USB on my board is working with a modified version of the earlier usb_dc_stm32.c on zephyr 1.9. (usb_dc_stm32.c was actually imported from a PR which had not been merged.). We did some modifications to make it work for the OTG_HS port. I can forward that modified file to you if you'd like to take a look. Also, You should be the right person to integrate this feature since most changes on the latest usb_dc_stm32.c come from you.
On 7/6/18, 10:07, "Yannis Damigos" <email@example.com> wrote:
On 07/06/2018 06:32 PM, Li, Jun R wrote:
> Based on the datasheet <https://www.st.com/resource/en/datasheet/stm32f427vg.pdf> of STM32F429(Page 40), the OTG_HS port supports both full-speed with its integrated transceiver or high-speed with an external Phy. So, the port can still be used as a full-speed USB port without any hardware efforts, which is the way I’m using it on a 429 board I have.
> To support it, we just need to use the corresponding registers for OTG_HS. This is what I’m expecting. So, I’m wondering where the macro “USB” will be enabled? I think renaming it to something else like CONFIG_HAS_USB_OTG_HS would be more meaningful.
I haven't checked the USB_OTG_HS in STM32Cube and I don't know if it will work out of the box with the usb_dc_stm32 driver. Probably not.
We need to create a second instance of a "USB device" (the driver right now doesn't support this). We also need to add support for this peripheral in the DT.
CONFIG_HAS_USB_OTG_HS (or just CONFIG_USB_OTG_HS) sounds reasonable to me.