Author Topic: Pro fails to enumerate  (Read 34398 times)

amadren

  • Newbie
  • *
  • Posts: 8
Re: Pro fails to enumerate
« Reply #45 on: July 19, 2014, 09:34:23 pm »
Hi, just received my digispark replacement but it's not connecting to the computer :/

It's powered correctly (the led is blinking) but nothing else

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Pro fails to enumerate
« Reply #46 on: July 19, 2014, 09:50:10 pm »
Obvious things . . . I had a cable the other day that wouldn't connect.  If you can try different cable use a different USB port - don't use a hub - (maybe try a hub).  Give the board a close look for soldered component connections.

amadren

  • Newbie
  • *
  • Posts: 8
Re: Pro fails to enumerate
« Reply #47 on: July 19, 2014, 10:07:59 pm »
That's what I did :/

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Pro fails to enumerate
« Reply #48 on: July 20, 2014, 12:02:57 am »
Have you got an UNO?  You could try to install the new bootloader like I just did.  Only Digistump will know what he sent you . . .

What OS?  Does it just ignore plugging it in - or pop up saying it had some failure to recognize it? 

amadren

  • Newbie
  • *
  • Posts: 8
Re: Pro fails to enumerate
« Reply #49 on: July 20, 2014, 12:23:04 am »
On windows 8.1 and Kali Linux, just like it doesn't even exists :/ I'll try the method with the UNO

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #50 on: July 21, 2014, 07:22:12 am »
I figured now out, that my PRO is only detected on some USB ports.

On two notebooks and one PC it is not connected at all, no matter which OS is booted.
On one notebook (Thinkpad T400) and one PC (Shuttle ds437) it is recognized.
On the Thinkpad only on one of the three built in USB 2.0 ports, on the shuttle on all 4 USB 2.0 ports (but not on the USB 3.0 ports).

On all the ports, where the PRO is not detected, my DigiX, and a original DUE as well as a Arduino Micro are detected on the very same cable!
I checked that with three cables!

When Linux is booted, the command "udevadm monitor" doesn't show a single line, however when Windows is booted and unknown USB device is reported for the PRO.

When I take the PRO and open the solder-jumpers for the Zeners and use my Digispark adapter (that digispark, where I have removed the broken attiny) as USB adapter, it is recognized!
http://digistump.com/wiki/_media/digispark/tutorials/removed-attiny.jpg?cache=&w=900&h=600
http://digistump.com/wiki/digispark/tutorials/programming#creating_digispark_compatible_clones

That means, as soon as I use the Zeners and resistors from the original Digispark, instead of those from the PRO, it is recognized!


gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #51 on: July 22, 2014, 09:05:35 am »
I managed to get hands on a DSO and connected that to D+ and D- in the USB-cable.

I made several measurements, and the positive and negative screens are looking almost the same.

D+ is green and D- is yellow.  One step in X-axis is equal to 1 ms, one step in y-axis is equal to 1V.    I had the USB connected to a notebook, which was running only from battery, to avoid conflicts with possible potential-differences.
D+ has a base current from -0.7V,
D- is pulled up to around 2V and in the situations, where the PRO is detected, it goes up to 3.8V and down to 0V.
In the situations where the PRO is not detected, it D- reaches only 2.7 V with only some small peaks going higher.

I assume, that the pullup resistor is to big, so that the current can't get to the expected level by the timing, when there is a somewhat higher serial resistance in the D- line of the USB host.

Where are the USB cracks?

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #52 on: July 22, 2014, 09:06:59 am »
and here the cases, where the PRO was not detected, as those were to big for one post:

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #53 on: July 22, 2014, 09:24:37 am »
unfortunately I had only the PRO with me and have not measured the original digispark. Need to do that in addition.

Rethinking, I would have expected, D- idling around 3.6V with signal peaks down to 0V like figure B in that documentation:
http://www.networktechinc.com/usb-prots.html

Perhaps there is a problem with the zener diode?

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #54 on: July 22, 2014, 01:23:56 pm »
OK, here are now two pictures with 5 us timing for the first sample.   Unfortunately I have changed the colors, but the lower one is still D-.

One is the failing USB port with the onboard zeners, the next is the same USB port with open solder jumpers and the zeners from my original digispark connected to. (That one, where I have removed the broken attiny).

Looks like, that the zener from D- is reducing the voltage too much!

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #55 on: July 23, 2014, 01:43:27 am »
and one more:
in this picture I have overlayed both pictures and added a clock scale.

What I currently don't understand:  You see, that D- is for about one clock on the expected voltage around 3.5V
After that pulse the voltage breaks down in both situations, however much stronger in the situation, where the PRO is not detected.

I see further, that at the beginning D- is not synchronous to the D+ clock, but gets synched with the first D+ pulse.

@cpldcpu, Bluebie:  can you bring some light into, what is happening on the USB level?

Which part can be responsible, that the current breaks down after one clock under certain circumstances?  As you can see, D- is also able to stay high for 3 clock pulses.


defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Pro fails to enumerate
« Reply #56 on: July 23, 2014, 02:54:46 am »
@gogol - does your Pro have the latest bootloader? As I read you are doing good work and indeed seeing hardware showing a measurable difference preventing communication.  But it seems there are more than a couple intermittent edge cases where the PRO got 'bricked' then came back better with a fresh bootloader - weak/odd signals could explain that - but the new code seems more robust - maybe Digistump addressed some symptoms but not the root problem?

BTW: My USB 2 & 3 laptop ports generally work and my HUB didn't.  At least once my USB 3 port went 'offline' until a reboot happened - something caused a ruckus or overdrew current (at higher USB 3 levels unless I have a weak/early one coming up on 3 years old)

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #57 on: July 23, 2014, 03:42:02 am »
I have the latest bootloader installed. However from my observations, that can't have anything to do with code.

As you see, everything is fine, when I use the other set of zeners and resistors from an original digispark. The good point on the PRO is, that there are solder-jumpers, where you can disconnect the on-board V-USB components, allowing this trick.

Its the very same code on the very same attiny running in both cases.  The difference is made just by the external components!


---
@Digistump:  I already asked that question in a parallel thread: http://digistump.com/board/index.php/topic,1468.0.html

Are the changes in the github repo related to the current Beta test?  Or has that newest bootloader you have linked in this thread other changes incorporated?

« Last Edit: July 23, 2014, 04:45:56 am by gogol »

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Pro fails to enumerate
« Reply #58 on: July 23, 2014, 04:11:56 pm »
I saw your #1468 note weeks back.  Indeed bad diode would be a problem - perhaps the code change addressed some symptoms.

Interesting you have the later bootloader to no affect.  I asked because mine got bricked - and my 'events' since flashing the new code have all been non-fatal.
« Last Edit: July 24, 2014, 03:05:03 am by defragster »

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Pro fails to enumerate
« Reply #59 on: July 24, 2014, 01:14:28 am »
The last code changes in github dealt with the calibration and storage of the last calibration value together with the uploaded sketch, so that a standalone device (which can't calibrate against an USB-Host) will run more exactly. That is the reason, why I am asking about what triggered the changes and if there might be more.

The problem I am seeing is, that the high-level is under certain circumstances to low, to be detected as high!  USB allows for 2.8V-3.6V for HIGH, and D- is for sure ways below that.  I can imagine, that better calibration helps detecting the weaker HIGH levels better, but that can't be the solution.

The whole picture is looking (for D-) this way:


 USB-Host .                        .       Digispark
          .                        .    Vcc
          .                        .    |
          .                        .   1.5k
          .                        .    |
 >---+----------------------------------+----68R---<
     |    .                        .    |
    15k   .                        .  3.6 Zener
     |    .                        .    |
    GND   .                        .   GND


So the question is, under which condition the current of D- breaks in, and under which conditions not.  The Zener seems to work, as, otherwise the higher level could never be reached. Or am I wrong?