Can burning the Arduino bootloader brick an USBtinyISP?

Hi!

I try now for hours to recover my ATMEGA328P and/or USBtinyISP. Normally I use avr-gcc and avrdude to flash Atmel MCUs. This time I wanted to try out some Arduino sources before porting it. So I used the same setup which was working before with avr-gcc and avrdude. I started the Arduino IDE selected "USBtinyISP" as programmer and "Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega328)" then I clicked "Burn Bootloader" to put the Arduino bootloader onto the chip. Since then the USBtinyISP is unable to program any chip. I tried several chips which I know were working before, I checked several USB Cables and reconnected all pins several times. Now I am out of ideas how to recover my USBtiny. How can I get my setup to work again?

Thats the output of avrdude:

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

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/blafoo/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 001:013
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         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    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 00 00]
CMD: [ac 53 00 00] [00 00 00 00]
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Meanwhile I checked with my oscilloscope all pins and the only thing i can see is a single 5V spike on SCK when trying to write to the chips flash with avrdude, all other Pins (RESET, MISO, MOSI) remain 0V besides VCC which has about the desired 5V.

Another thing I recognized is that if I try to read the fuses with avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F the device signature is different for each call:

$ avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe0a1e8
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

$ avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe031d8
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

$ avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe05131
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

$ avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe0a13b
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

$ avrdude -p m328p -c usbtiny -U lfuse:r:-:b -U hfuse:r:-:b -U efuse:r:-:b -F

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe06187
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

I tried different speeds with using the -B flag, therefore I used a script which tries to read the fuses with speeds from 100kHz to 60000kHz in 100kHz steps. No success :frowning:

Meanwhile I checked with my oscilloscope all pins and the only thing i can see is a single 5V spike on SCK when trying to write to the chips flash with avrdude, all other Pins (RESET, MISO, MOSI) remain 0V besides VCC which has about the desired 5V.

Check the USBTinyISP 12Mhz crystal pins with the oscilloscope. Less than 1V on mine but shows it is oscillating at 12Mhz when powered up.

kprims:
Check the USBTinyISP 12Mhz crystal pins with the oscilloscope. Less than 1V on mine but shows it is oscillating at 12Mhz when powered up.

Good idea!
I just checked and this crystal oscillates at 12MHz with about 1V as well.

Jumper JP3 (USB power to target)

There's a jumper sticking out near the cables, JP3. When the jumper is in place (connecting the two wires) then that means that the USBtinyISP is providing 5V power to the device being programmed. If you don't want to power the device then just take the jumper out or make sure it's only on one of the wires.
The USBtinyISP can only provide 5V, up to about 100mA to the device. If you need more power then you should remove the jumper and power the device seperately. (Alternately, if you're feeling adventurous you can reprogram the USBtinyISP to requires 500mA from the USB port instead of 100mA but if you don't know how to do this I'd suggest not.)
Version 1.0 of USBtinyISP sends data to the device at 5V level no matter whether it's powering the device or not so make sure it's 5V compliant! (Note that there are 2 1.5K resistors in series with the data lines for protection)
Version 2.0 which is almost certainly what you've got, uses a level shifter so that if the jumper is not in place, it will use whatever the target voltage is, a lot better for your low-voltage devices!
So, if you have a device that needs to run at 3.3V, don't have the jumper in place!

With the jumper removed and my PCB powered from a separate source at 3.3V everything works. I know you mentioned 5V in your tests but is it possible you removed the JP3 jumper?

kprims:
Jumper JP3 (USB power to target)User Manual | USBtinyISP | Adafruit Learning System
With the jumper removed and my PCB powered from a separate source at 3.3V everything works. I know you mentioned 5V in your tests but is it possible you removed the JP3 jumper?

No, I did not remove that jumper :frowning:
Also, trying it with 3V3 did also not change anything.

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