Upload to Digispark fails: "Device search timed out!"

Continuing the discussion from Digistump Digispark no longer available?:

Thanks for this thread. I used

in preferences and installed the ATTiny Core.
Chose Board ATtiny85 (Micronucleus / Digispark)
Created a little Hello World blink sketch

Uploading fails with

Der Sketch verwendet 758 Bytes (11%) des Programmspeicherplatzes. Das Maximum sind 6586 Bytes.
Globale Variablen verwenden 6 Bytes (1%) des dynamischen Speichers, 506 Bytes für lokale Variablen verbleiben. Das Maximum sind 512 Bytes.
C:\Users\Micha\AppData\Local\Arduino15\packages\ATTinyCore\tools\micronucleus\2.5-azd1b/micronucleus --no-ansi --run --timeout 60 C:\Users\Micha\AppData\Local\Temp\arduino_build_463365/digisparkTest_0.ino.hex 
> Please plug in the device (will time out in 60 seconds) ... 
> Device search timed out!

Of course I plugged in the small digispark only when told so.

I assumed a missing driver, downloaded as described
Digistump.Drivers.zip (1.6 MB) , extracted the folder Digistump Drivers and ran Install Drivers.exe on my win11

This seems to have worked, showed at least no errors.
However, the

> Please plug in the device (will time out in 60 seconds) ... 
> Device search timed out!

still behaved the same.

When I plug in the digistump, I notice a new USB device ! ( palim sound, showing up in device manager at USB-Controller a yellow triangle "Unbekanntes USB-Gerät (Fehler beim Anfordern einer Gerätebeschreibung)

There's still a Microsoft Driver assigned to it
How to manually update it to which of the Digistump Drivers ?


The power led is lit immediately when plugged into a USB port, nothing else ...

1 Like

@michael_x

1. Are you sure that the ATtiny85 MCU of the Board of post #10 contains the same "Boot Loader Program" which is within the ATtiny85 MCU of the following Board (Fig-1)?


Figure-1:

2. Please, post your sketch.

  1. I'm pretty sure :slight_smile: I found that attiny85 devboard deep in a drawer and think to remember, it then (couple of years ago) behaved identically to an original digispark. Now I have a new laptop and wanted to reactivate it using my Arduino 1.8.19 IDE

  2. The sketch is trivial and compiles fine. But here you are:

void setup() {
  pinMode(0,OUTPUT); 
  pinMode(1,OUTPUT); 
}

void loop() {
  digitalWrite(0,HIGH);
  digitalWrite(1, HIGH);
  delay(500);
  digitalWrite(0, LOW);
  delay(500);
  digitalWrite(0, HIGH);
  digitalWrite(1, LOW);
  delay(500);
  digitalWrite(0, LOW);
  delay(500);
}

Two blink cycles, nothing else.

How can I / Do I need to / get a bootloader onto that attiny?

After plugging in, it takes about a second, then palim sound and that "Unkown USB-Device with error when asking for a device description" shows up.

1 Like

After connecting your ATtiny85 Dev Board with the PC and opening the Device Manager, do you see the following message (Fig-1)?
Digispark Bootloader
Figure-1:

No.
When connecting it, a yellow triangle "unknown device" appears.

1. When I have conncted my ATtiny85 Dev Board (Fig-1) with ATtiny85 with "No Digipark Boot Loader Program", I get the follwing message (Fig-2) which is similarr to your one. This indicates that your Board is equipped with ATtiny85 which does not contain Boot Loaer Program. If I connect a board with ATtiny85 MCU having Bootloader Program installed, I get message of Fig-3.


Figure-1:


Figue-2:

Digispark Bootloader
Figure-3:

2. I have attached the Digispark Boot Loader Program for you. You can use a ROM/AVR Programmer to copy it into your blank ATtiny85 MCU.
Digisparkbootloader.zip (3.9 KB)

1 Like

Thanks a lot, @GolamMostafa.

The message "Device Descriptor Request Failed" is obviously the source of my translated
"Fehler beim Anfordern einer Gerätebeschreibung", showing up in a German Win11.

Now I'll have to find out how to use a real Arduino running ArduinoAsISP to load your .hex file onto my attiny85.

If you have problem, please don't hesitate to express.

It is for your informatio that the Fuse Bit and Lock Bits settings are:

For ATtiny85 MCU of the Digispark Dev Board:

EF    HF     LF    LB
FE    DD     E1    FF

For the fresh ATtiny85 MCU:

EF    HF     LF    LB
FF    DF     62    FF
1 Like

@michael_x

Hi! Any progress?

Sorry, Easter holidays & family are more important than reactivating old electronics from drawers.
And I found a twin attiny85 board, which connected immediately and allowed to upload that test sketch:

Der Sketch verwendet 520 Bytes (7%) des Programmspeicherplatzes. Das Maximum sind 6586 Bytes.
Globale Variablen verwenden 6 Bytes (1%) des dynamischen Speichers, 506 Bytes für lokale Variablen verbleiben. Das Maximum sind 512 Bytes.
C:\Users\Micha\AppData\Local\Arduino15\packages\ATTinyCore\tools\micronucleus\2.5-azd1b/micronucleus --no-ansi --run --timeout 60 C:\Users\Micha\AppData\Local\Temp\arduino_build_489018/digisparkTest_1.ino.hex 
> Please plug in the device (will time out in 60 seconds) ... 
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.3
> Device signature: 0x1e930b 
> Available space for user applications: 6522 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 102  page size: 64
> Erase function sleep duration: 714ms
parsing: 50% complete
> Erasing the memory ...
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload ...
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app ...
running: 100% complete
>> Micronucleus done. Thank you!

So this one is the one I remembered. It behaves like a Attiny85 (Micronucleus / Digispark)
Years ago, I obviously had managed to upload a micronucleus bootloader :slight_smile:
Will give a try to the other board some day. And eventually document it here.

Thanks, @GolamMostafa.

BTW: Pin 1 is the one connected to the onboard led.

BTW2: the "libusb-win32 devices - Digispark Bootloader" is visible a short time, but disappears a few seconds after plugging in (as soon as the sketch is running), reverting to the "unknown USB Device"

2 Likes

Thanks for the reply and happy to know that you have found a borad that is working.

I am afraid that we have missed the opportunity of knowing the procedures of copying the Digispark Bootloader Program into a fresh ATtiny85 MCU.

Struggling with avrdude via ArduinoISP to talk to my other attiny.
The closest I came up to now is using the proper avrdude.conf file:

-C C:\Users\Micha\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2/avrdude.conf

I spyed how "Burn Bootloader" to an attiny85 (no bootloader) connects.

And I took the attiny85 from the digispark-clone environment put it to a breadboard and connected

UNO   attiny85 pin
-----+-------------
 5V       8 Vcc
GND       4 GND
 13       7  PB2 (SCK)
 12       6  PB1 (MISO)
 11       5  PB0 (MOSI)
 10       1  PB5 (RESET)

and a capacitor on the Uno between GND and RESET.

I understand the -n option does nothing but talking ISP to the target (getting/checking the signature and fuses)

C:\Users\Micha>AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18\bin\avrdude.exe -C AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\avrdude.conf -v -p attiny85 -c stk500v1 -P COM3 -b 19200 -n

avrdude.exe: Version 6.3-20201216
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\avrdude.conf"

             Using Port                    : COM3
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             Setting bit clk period        : 5.0
             AVR Part                      : ATtiny85
             Chip Erase delay              : 400000 us
             PAGEL                         : P00
             BS2                           : P00
             RESET disposition             : possible i/o
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    12     4    0 no        512    4      0  4000  4500 0xff 0xff
               flash         65    12    32    0 yes      8192   64    128 30000 30000 0xff 0xff
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
               lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel STK500 Version 1.x firmware
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude.exe: Device signature = 0x1e930b (probably t85)
avrdude.exe: safemode: lfuse reads as E2
avrdude.exe: safemode: hfuse reads as D7
avrdude.exe: safemode: efuse reads as FF

avrdude.exe: safemode: lfuse reads as E2
avrdude.exe: safemode: hfuse reads as D7
avrdude.exe: safemode: efuse reads as FF
avrdude.exe: safemode: Fuses OK (E:FF, H:D7, L:E2)

avrdude.exe done.  Thank you.

Probably the initial "Burn Bootloader" to an attiny85 (no bootloader) modified the fuses a bit.

Later:
Changed fuses to your (@GolamMostafa) suggestion
-Ulfuse:w:0xE1:m -Uhfuse:w:0xDD:m -Uefuse:w:0xFE:m
Updated flash to the micronucleus bootloader ( extracted and renamed from your zip file in #15
-Uflash:w:Documents\Arduino\DigistumpDrivers\DigisparkBootloader.hex:i

The programmer option -c avrisp , as it was suggested for the ArduinoISP Sketch somewhere in the internet, works as well by the way.

Then the attiny85 could be returned to the digispark clone and got a sketch via normal Arduino IDE upload.
Done

BTW: my "working" digispark clone has a pullup resistor of only 1k5 between PB3 (ADC3) and Vcc, and a 3V Zener Diode to GND. Probably for the USB connection. This disturbs its usage as analogRead pin. Not sure if I want to get rid of that digispark-clone board, now as I'm close to ISP programming :wink:

The original Digispark Board and the clone are electrically identical. Clone version is particularly convenient becuase of its micro-USB connector and the sockect mounted ATtiny85 which can be easily ported to a user-defined PCB/system.

1 Like

My first try (virgin) digispark-clone now got your micronucleus bootloader. ( See #22 for details )
For the time being, I can live with the restrictions of PB3 (and probably PB4)
Also, let's see which peripherals have to be removed/disconnected during upload, but that would have to be considered for the ISP-pins as well.

Thanks for your support, @GolamMostafa :smiley:

PB3 and PB4 can be used to handle peripherals except that those IO devices should remain disconnected during uploading process.

Regarding the thing disappearing I think this might depend on which setting you use to upload your sketch.
I used "Default 16.5MHz" and it continues to be recognisable as a USB device, but there were three "No USB" options.

Also as I understand it all you need is just the one pull-up resistor to get an "Unknown device" detection on USB, so if you actually removed the microcontroller altogether you'd still get "Unknown device".

In Device manager it might say the more specific "Unknown USB Device (Device Descriptor Request Failed)" as that's what I see if the part is held in reset.

I am having this issue too :sob: though, it is a little different because there is no trace of it in the device manager, not even a warning sign saying the device is not recognized. I have tried 2 different drivers and neither of them have worked and arduino IDE still can't recognize the board. Does anyone know what could be causing this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.