Posted on November 29, 2017 at 23:14There are two OTG modules in the mid-to-high-end 'F4s, one is called OTG_HS other OTG_FS. OTG implies that they can act as Device or as Host (and there are mechanisms to switch between these 'on the go' - that's why OTG; but software can simply set a fixed Device or a fixed Host). Think of two USB adapter cards in your PC, one outside-facing USB connector each. Both have a FS PHY integrated on-chip, connected to the physical pins (those are those pin sets in AF tables, mainly DP/DM - those are equivalent of those outside-facing USB connectors). if you want High-Speed USB, you need connect an external HS-PHY chip to the OTG_HS (that's why it has much more pins in the AF table); thus you can have only one HS, the OTG_FS module is not HS capable.
When sticking only to the on-chip PHY, you can thus have two FS hosts, they both can connect to one FS or LS device. From the basic architecture of USB it follows that you cannot connect more than one device to one host; you need to insert a hub to be able to branch. The host firmware has to support the hub.
The last time I checked there was no Host firmware in CubeF4; there's an older firmware including Host, with MSC and HID classes implemented, based on SPL. AFAIK, there was no public hub-supporting host firmware. The OTG modules are IPs from Synopsys, so in theory firmware from other Synopsys-based USB implementations should be portable (e.g. the SoC on the RPi contain such); but it's far, far from being trivial.
JW