Single USB Host to Multiple USB Virtual Ports
Hello,
I have an STM32F373 and have successfully enabled a USB virtual com port.
I currently send data packets from a PC host to the slave device and include a 'deviceId' in the packet data header.
I would like to support the single PC host communicating with multiple slave devices. There would be no more than 12 slave devices, and I would like to add new devices.
I plan on enabling a USB virtual com port for each slave device, and have them ignore packets not addressed to their deviceId. Each device would only send a response if the packet is addressed to it. The single host would ensure it only attempts to communicate with 1 device at a time.
I recall seeing that STM32 allows the USB port to connect to multiple devices in this way. ( not sure though )
What is the best way to connect each slave device to the USB connection? Should I just split the 2 USB input (DM,DP) and send them to each slave device directly, or should I investigate a better circuit/components. ( eg. should I worry about current draw, diodes or isolation )
I could also have 1 slave device acting as 'master' for all other slave devices and have the PC host only communicate with that 1 slave device. ( use SPI or USART connection between slave devices instead of USB virtual host )
Lastly, I am looking at a USB hub controller IC, such as the TUSB1046.
Any advice will help.
Thank you,
