Embedded USB A malfunction - Page 1
Forum section: electronics / projects

author: abelCortex
author_rank: Contributor
timestamp: October 18, 2024, 08:08:44 am
content: The device detects well some USB, other it doesn't, I followed the manufacturer design schematics, the transmission line resistors, HF filter capacitor, separated grounds and even a ESD protection circuit.Anyone knows what is causing this problem or if its maybe problem of USB.

author: MarkF
author_rank: Super Contributor
timestamp: October 18, 2024, 08:29:59 am
content: Here is my USB circuit.I don't have the series resistors. But, I do have small filter capacitors on the data lines.

author: abelCortex
author_rank: Contributor
timestamp: October 18, 2024, 09:02:05 am
content: The micro is a Renesas S7G2 and right now I'm reading a schematic of a USB host and the 27 ohm resistor aren't placed, just the ESD protection, but i don't know this can cause the problem. At least in this schematic when the port is used as Host 27 ohm aren't placed but when its used as device port yes.

author: ataradov
author_rank: Super Contributor
timestamp: October 18, 2024, 02:26:46 pm
content: All the grounds are going to be the problem. Always are. Populate R14 to at least connect the grounds for the ESD. Right now it is either floating or connected to the actual ground that signals are referenced to through a huge inductor of the cable.And what are PGND and DGND? How are they related?

author: aeg
author_rank: Regular Contributor
timestamp: October 18, 2024, 11:26:24 pm
content: You haven't established whether this is a signal integrity problem or a protocol problem... You need to find out what's happening during USB enumeration, either with a USB protocol analyzer or by adding debugging output to your USB host stack. If you spend the rest of your life fumbling around replacing resistors based on someone's hunches, you will still never solve it.

author: abelCortex
author_rank: Contributor
timestamp: October 21, 2024, 06:12:15 am
content: I tried to take of the resistors and place one between the grounds but stills dont works, I think its still a ground/noise problem becouse for example a take a never used USB memory and the program don't recognize it but I place it in a PC I create a empty folder, delete it, I put it on the device again and now it recognizes it.

author: ataradov
author_rank: Super Contributor
timestamp: October 21, 2024, 06:21:30 am
content: You still have not answered what are PGND and DGND and which one is the MCU ground. And what is the MCU?Why would noise affect behavior depending on what is on the drive? It more indicates some issue with the FS driver. What do you use for that?Also, debug what is going on and see what fails.

author: abelCortex
author_rank: Contributor
timestamp: October 21, 2024, 06:36:33 am
content: PGND Its a GND only used in the USB circuit and the MCU ground it DGND, the MCU its a renesas s7g2.I also add the schematic of the s7g2 evaluation board of USB.

author: ataradov
author_rank: Super Contributor
timestamp: October 21, 2024, 06:46:17 am
content: What are those 27 Ohm resistors? They are not present in the datasheet or reference schematic.Also, how does the board layout look like?

author: abelCortex
author_rank: Contributor
timestamp: October 21, 2024, 07:02:22 am
content: As you can see when the USB its configured as device these 27 ohm resistor are placed, but no when its host, anyway i tried to remove them and still don't recognizes some USB, right now I'm reading about the process of binding, PID/VID number of the USB its involved in the process maybe there are numbers that don't recognizes, I will continue reading. Thanks for the help.

author: ataradov
author_rank: Super Contributor
timestamp: October 21, 2024, 07:07:24 am
content: Those are different pins. One is HS controller another one is FS. Completely different IP, different requirements.Having a USB sniffer would answer all the questions immediately, but just run it under the debugger and checking what happens would also help a lot.

author: abelCortex
author_rank: Contributor
timestamp: October 21, 2024, 11:31:04 am
content: Okey I think I got the cause of the problem, renesas uses USBX, depending of the USB's VID aplies a driver or another, casually the USB that dont works isn't in that list

author: ataradov
author_rank: Super Contributor
timestamp: October 21, 2024, 01:39:03 pm
content: This makes no sense and VID would not change after you make a folder. So, you are likely misunderstanding something.

author: abelCortex
author_rank: Contributor
timestamp: October 21, 2024, 02:10:07 pm
content: I know but at least when I do this the USB works, but there are USB that never recognizes casually those whose VID don't appear on that list:https://www.linux-usb.org/usb.ids

author: ataradov
author_rank: Super Contributor
timestamp: October 21, 2024, 04:10:34 pm
content: Well, it is up to you what you want to accept as a solution.But generally VID/PID do not matter, enumeration happens based on the descriptors. Using VID fro this is a stupid idea and basically guaranteed to break. The only reason you would filter by VID is if you actually want to only work with devices from one specific vendor, which is not common.I would actually investigate what is going on. Like, can you identify that list in the code? USB stack can't magically be aware of that list.

author: abelCortex
author_rank: Contributor
timestamp: October 22, 2024, 06:18:25 am
content: Your are right the more I think about it makes less sense, I will be all morning reading