Had a look at what TinyUSB is capable of now, it doesn't prevent you anymore from running Device and Host at the same time, so I refactored the code to allow generating both.
Also fixed some very embarrassing oversight of not configuring the USB pins for high speed, which prevented the ULPI signals from working. In addition, the HS port can also be used in FS mode, in which case the ULPI clock must remain disabled! This is now correctly being done, together with the GPIO config.
I don't have a way to test host mode, due to lack of the correct adapter. I would do that later and fix whatever is broken then.
TinyUSB changes:
[x] Upgrade TinyUSB to v0.16.0.
[x] Allow Device and Host to run on the same device on separate ports.
[x] Allow to downgrade the HS port speed to FS.
[x] Correctly partition the device class files for host and device, incl. shared files.
STM32 changes:
[x] Validate the ULPI signals on HS port on STM32 while also allowing to connect FS signals.
[x] Configure pins for high speed on STM32 USB ports.
[x] Split off the USBOTGHSULPI clock into it's own peripheral so that HS port in FS mode works.
[x] Moved the all_peripherals generator to :cmsis:device:peripherals query.
[x] DISCO-F429ZI BSP gets a logger, it requires closing SB11/SB15 and upgrading the STLink firmware.
Tested:
[x] Device Mode:
[x] generic/usb:
[x] Black-Pill-F401 (cannot find the F411 version)
Had a look at what TinyUSB is capable of now, it doesn't prevent you anymore from running Device and Host at the same time, so I refactored the code to allow generating both.
Also fixed some very embarrassing oversight of not configuring the USB pins for high speed, which prevented the ULPI signals from working. In addition, the HS port can also be used in FS mode, in which case the ULPI clock must remain disabled! This is now correctly being done, together with the GPIO config.
I don't have a way to test host mode, due to lack of the correct adapter. I would do that later and fix whatever is broken then.
TinyUSB changes:
STM32 changes:
all_peripherals
generator to:cmsis:device:peripherals
query.Tested: