Problems Re-Flashing ATtiny85 with avrdude and usbtiny

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am struggling to reflash an ATtiny85 using a usbtiny device.

 

Funny thing is I programmed the same chip about 10 times or so in the past without any issues, and after couple months of not touching the setup I just wanted to reprogram another hex file, but the chip never receives the new firmware.

 

Take a look at the avdude output, as you'll realize the write operation never happens. This, ultimately, is my question. What do you think might cause the write to never get invoked?

 

I'd like to develop under windows using Atmel studio, so in order to keep that spirit alive, I have ordered an atmel ice debugger-programmer, so I will try to program the chip with it once it arrives, but in the meantime I will give it a go using the raspberry pi and its' GPIOs to get my code into the chip and eliminate the possibility of working with a bricked chip...

 

 


>avrdude -c usbtiny -p t85 -v -v -v -u flash:w:GccApplication.hex:i

avrdude.exe: Version 6.3, compiled on Feb 17 2016 at 09:25:53
             Copyright (c) 2000-2005 Brian Dean,
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is 

             Using Port                    : usb
             Using Programmer              : usbtiny
avrdude.exe: usbdev_open(): Found USBtinyISP, bus:device:
             AVR Part                      : ATtiny85
             Chip Erase delay              : 4500 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     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                      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
                                      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  9000  9000 0x00 0x00
                                      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  9000  9000 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  9000  9000 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  9000  9000 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

             Programmer Type : USBtiny
             Description     : USBtiny simple USB programmer,
avrdude.exe: programmer operation not supported

avrdude.exe: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 53 00]
avrdude.exe: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00sCMD: [30 00 00 00] [00 30 00 1e]
CMD: [30 00 01 00] [00 30 00 93]
Reading | #################                                  | 33% 0.01sCMD: [30 00 02 00] [00 30 00 0b]
Reading | ################################################## | 100% 0.03s

avrdude.exe: Device signature = 0x1e930b (probably t85)

avrdude.exe done.  Thank you.
Last Edited: Thu. Dec 7, 2017 - 09:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I resolved the issue. 

 

Just to note:

I could not write to the device using:

>avrdude -c usbtiny -p t85 -v -v -v -u flash:w:GccApplication.hex:i

but I was successful with the following command.

>avrdude -c usbtiny -p attiny85 -U flash:w:GccApplication.hex:i
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

t85 is the same as attiny85 or ATtiny85 (which is my preference)
Yes, all the switches are case sensitive e.g -u is different to -U
.
Yes, the verbose output is horrible. But it is useful when something goes wrong.
.
David.