2024-10-24 06:06 AM
My current application uses 2 USB ports, both connected to USBPHYC (STM32MP157F). The OTG one is used for programming using CubeProgrammer.
My new revision requires 3 USB ports, 2 host and the programming port.
According to https://community.st.com/t5/stm32-mpus-software-development/how-to-enable-3-usb-ports-on-stm32mp1/td-p/269938 it is (still) not possible to configure this in CubeMX.
Im wondering if this configuration is going to work:
USBH_HS1->USBPHYC-> USB_DM/DP1 pins (Host)
USBH_HS2->USBPHYC-> USB_DM/DP2 pins (Host)
USB_OTG->OTG FS Phy->PA11/PA12 pins (device/programming)
AN5031 states that the internal bootROM will use high-speed, which means my suggested setup is not possible?
2024-10-24 11:35 PM
Hi @allard
yes, what listed in AN5031 will work (although not usual, I know some customers use that).
You should manually adapt the Device Tree to this case.
For the flashing, you should also build a specific uBoot (used only for flashing, i.e. only for the part #3 fip-boot line in flashlayout file) which must use USB_DM/DP2 pins as USB_OTG device mode high-speed (so specific Device Tree for this uBoot, like this). Then the flashed uBoot use your 3 port scheme as you need.
Obviously, you also need a non-standard USB Type-A <-> Type-A cable to connect to the PC to the right board connector (ok as only for production flashload).
Obviously, adding a hub IC as on STM32MP157F-DK is more straightforward (and bring OTG in high-speed), but more external components required.
Regards.