Go Down

Topic: Avrdude Verifcation failure when using -q switch (Read 1 time) previous topic - next topic

Marvin Martian

This isn't Arduino per se, but just wondering if anyone's come across this before - I was initially using the VisualMicro IDE to upload to a Tiny85 using a TinyISP programmer, but have now removed the IDE from from the suspects list and can reproduce with just avrdude and my compiled .hex

Basically this works:
Code: [Select]
avrdude -c usbtiny -p attiny85 -U flash:w:Tiny85Test.hex

but adding the -q switch like this fails
Code: [Select]
avrdude -c usbtiny -p attiny85 -q -U flash:w:Tiny85Test.hex

with the following error
Code: [Select]
avrdude: verification error, first mismatch at byte 0x00c0
         0xb0 != 0x68
avrdude: verification error; content mismatch


I'm using the Arduino 1.0.3 fileset and the Avrdude that that contains...
Unfortunately VisualMicro adds the -q when it builds teh Avrdude command line, so the upload always fails.


Marvin Martian

A bit more investigation shows that it fails with avrdude v5.11 but succeeds with v5.10

I was wondering if it could be a timing issue, since outputting the ### progress markers on the console might be slowing things down enough to affect timings somewhere...

Erni

#2
Mar 12, 2013, 02:51 pm Last Edit: Mar 12, 2013, 04:07 pm by Erni Reason: 1
I don't know if this helps:

I noticed that a new release of avrdude, was released just one month after ver. 5.11  called 5.11.1

So maybe there was a bug in 5.11 ?

http://download.savannah.gnu.org/releases/avrdude/

More about ver. 5.11 problems

http://arduino.cc/forum/index.php/topic,152732.0.html

fungus


A bit more investigation shows that it fails with avrdude v5.11 but succeeds with v5.10


I'm using USBtinyISP and avrdude 5.11. I use it on a lot of different chips, it works fine.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Erni

yet another error report re.: avrdude ver. 5.11 and 5.11.1 and USBTiny

http://forums.adafruit.com/viewtopic.php?f=25&t=28382

Quote
I'm using USBtinyISP and avrdude 5.11. I use it on a lot of different chips, it works fine.


Maybe difference in firmware version or driver or OS ?

hiduino

I get the verification failures usually when the programmer's sck clock is too fast when the attiny internal clocking set below 1.5 MHz.  You can usually fix this by slowing down the sck clock signal.  A few programmers like the usbtiny can be told to slow down with an avrdude -B option.

Try this:
Code: [Select]
avrdude -c usbtiny -p attiny85 -q -B50 -U flash:w:Tiny85Test.hex



You may need to experiment with bigger numbers -B100, -B250.  Of course it will really slow down the programming the higher you go.

I suspect that that the -q option is removing some delays in outputting the progress bar display info.  So in effect it is speeding up the writing a little bit.



hiduino

Alternatively, if you are not able to use the -B option in avrdude, some programmers do not support that option, or you are not able to add that to the command sequence.  You can try a programmer like the USBasp which will support a hardware jumper setting to use a slow sck clock.  But be aware that there are many different versions of the USBasp and some do not support the hardware jumper setting.


Marvin Martian

I tried the 5.11.1 patch last night but no luck - problem still exists. I have just realised that this is still a 'virginal' Tiny85 - the fuses have not yet been set (due to a possible issue with VisualMicro) so that may have a bearing. it's supposed to be on 8Mhz internal clock but is currently on 1Mhz I think. I'll set teh fuses separately tonigth and see if that changes anything...

hiduino

Were you able to try the -B50 option with avrdude?  That should work with the 1MHz clocking.


Marvin Martian

Literally just tried it - still the same problem

Also burnt the fuses for 8 / 8 and 8 / 1 MHz - still fails at both settings :(


hiduino

Sounds like your USBtinyISP may be have problems.  Or are you able to try another tiny85 chip to verify?
Do you have another type of programmer to test with?




Marvin Martian

I don't think it's the programmer as it worked fine with avrdude 5.10 and has been working for a couple of years. Don't have another '85 but I do have a '2313 so I'll try that as soon as I get a chance again

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview