The embarrassing thing about USB

Recently, I was making a product that used a USB3.0 interface. When designing the product function, there were misunderstandings about USB, which led to errors in the design. I will record it now to prevent similar problems from happening in the future. joke):

Misunderstanding 1: Think USB3.0/2.0 are two independent interfaces

We are using a 5G module. The following is the description of the USB interface in the product manual:
Insert image description here
Pay attention to the part marked in the red box. At first, I only noticed that the USB interface complies with the USB2.0 and USB3.0 specifications, and naively thought that it was two independent interfaces, one was USB2.0 and the other was USB3.0, so I designed The following USB device architecture:
Insert image description here
As you can see, USB2.0 is used as a serial port extension and USB3.0 is used as a debugging port. However, after communicating with the technical staff of the module manufacturer, they clearly stated that the module has only one USB Phy , which means that USB2.0 and USB3.0 are the same USB physical interface, but it conforms to the USB2.0 and USB3.0 specifications. In fact, the product manual makes it very clear that it provides an integrated USB interface, but the interface supports USB3.0 and USB2.0 specifications . Alas, I didn’t pass the Chinese language test in elementary school! -_-||

Misunderstanding 2: Thinking that USB HUB can connect Host and Device at the same time

When I first started designing the USB device architecture, I also entered into a very low-level misunderstanding, that is, I naively believed that after the USB HUB, you can connect to either a USB Device (such as a USB to UART chip) or a USB Host (such as a PC). , as shown below:
Insert image description here
I am really ignorant. How can a USB interface be used as both Host and Device at the same time? Even through USB HUB, it is impossible! USB HUB only serves the USB Host. It only expands the number of USB devices that USB can connect. However, both ends of the HUB must not be connected to two HOSTs at the same time. This violates the design principle of USB: the same USB In the system, there can only be one HOST at the same time. Remember, there can only be one!!

The above two misunderstandings can show that I actually know nothing about USB. However, the interesting thing is that I actually designed a set of USB device architecture that I thought could work. Fortunately, this was in the design stage. It would be a disaster if problems were exposed after the hardware was designed! ! Therefore, we must be in awe of technology and cannot pretend to understand, let alone guide others in a self-righteous way. Otherwise, the consequences will be disastrous! !

Guess you like

Origin blog.csdn.net/linux_embedded/article/details/124084676