Author Topic: Embedded USB A malfunction  (Read 864 times)

0 Members and 2 Guests are viewing this topic.

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Embedded USB A malfunction
« on: October 18, 2024, 08:08:44 am »
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.

 
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2749
  • Country: us
Re: Embedded USB A malfunction
« Reply #1 on: October 18, 2024, 08:29:59 am »
Here is my USB circuit.
I don't have the series resistors.  But, I do have small filter capacitors on the data lines.

2405747-0
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #2 on: October 18, 2024, 09:02:05 am »
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.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #3 on: October 18, 2024, 02:26:46 pm »
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?
Alex
 
The following users thanked this post: moffy

Offline aeg

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Re: Embedded USB A malfunction
« Reply #4 on: October 18, 2024, 11:26:24 pm »
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.
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #5 on: October 21, 2024, 06:12:15 am »
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.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #6 on: October 21, 2024, 06:21:30 am »
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.
Alex
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #7 on: October 21, 2024, 06:36:33 am »
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.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #8 on: October 21, 2024, 06:46:17 am »
What are those 27 Ohm resistors? They are not present in the datasheet or reference schematic.

Also, how does the board layout look like?
Alex
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #9 on: October 21, 2024, 07:02:22 am »
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.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #10 on: October 21, 2024, 07:07:24 am »
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.

Alex
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #11 on: October 21, 2024, 11:31:04 am »
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
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #12 on: October 21, 2024, 01:39:03 pm »
This makes no sense and VID would not change after you make a folder. So, you are likely misunderstanding something.
Alex
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #13 on: October 21, 2024, 02:10:07 pm »
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
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11842
  • Country: us
    • Personal site
Re: Embedded USB A malfunction
« Reply #14 on: October 21, 2024, 04:10:34 pm »
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.
Alex
 

Offline abelCortexTopic starter

  • Contributor
  • Posts: 19
  • Country: es
Re: Embedded USB A malfunction
« Reply #15 on: October 22, 2024, 06:18:25 am »
Your are right the more I think about it makes less sense, I will be all morning reading  :box:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf