bugAVR Downloader/UploaDEr - Bugs: bug #46759, avrdude 6.1 -> 6.2 regression:...


You are not allowed to post comments on this tracker with your current authentication level.

bug #46759: avrdude 6.1 -> 6.2 regression: lock byte verification error

Submitted by:  Milan Kupcevic <miki>
Submitted on:  Sat 26 Dec 2015 02:03:19 AM UTC  
Votes:  50  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Milan
Open/Closed:  Open Release:  None
Programmer hardware:  Device type: 

Tue 02 Aug 2016 08:12:21 PM UTC, comment #4: 

Well, STK500 and JTAGICE3 are not affected by this bug as they use an alternative method to read the bits since commit r1336. Yet, many other programmers are still affected. See the patch proposal #8996 for possible fix.

Milan Kupcevic <miki>
Tue 02 Aug 2016 06:49:05 PM UTC, comment #3: 

Is anything fixed in this regard in 6.3? I just tried STK500 and JTAGICE3 which both read unused lock bits as 1.

Matthijs Kooijman <matthijs>
Mon 09 May 2016 03:04:50 AM UTC, comment #2: 
Milan Kupcevic <miki>
Sun 08 May 2016 06:58:32 PM UTC, comment #1: 

This bug is a result of commit r1336, which is a move in the right direction as far as fixing of inconsistent behavior described in bug#21954 goes.

But now we should make the behavior of all other programmers consistent.

Per Atmel recommendation unused bits should be set to 1. They are supposed to read back out of hardware as 1. Therefore the user writing the lock bits should just follow the recommendation and get the correct outcome.


@$> avrdude -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0xff:m


 avrdude: verifying ...
 avrdude: 1 bytes of lock verified


@$> avrdude -patmega328p -cusbtiny -Pusb -e -Ulock:w:0xff:m


 avrdude: verifying ...
 avrdude: verification error, first mismatch at byte 0x0000
          0x3f != 0xff
 avrdude: verification error; content mismatch

 avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

 avrdude done. Thank you.

Therefore the lock definition in avrdude.conf should no longer mask reading of unused lock bits the same way as it has already been done for efuse bits with commit r1335 per discussion of bug#22248.

Milan Kupcevic <miki>
Sat 26 Dec 2015 02:03:19 AM UTC, original submission:  

Setting lock bits with avrdude version 6.1 woks as expected while
version 6.2 yields verification error:

  @$> avrdude -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0x3f:m

  [ ... ]

  avrdude: verifying ...
  avrdude: verification error, first mismatch at byte 0x0000
           0xff != 0x3f
  avrdude: verification error; content mismatch

  avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

  avrdude done.  Thank you.

I'm getting the same regression with both AVRISP mkII and AVR Dragon
programmers on ATmega328p, ATmega32U4 and ATmega2560 microcontrollers.

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809002

Milan Kupcevic <miki>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by matthijs (Posted a comment)
  • -email is unavailable- added by miki (Voted in favor of this item)
  • -email is unavailable- added by miki (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 50 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-28 miki Carbon-Copy- => Added miki

    Back to the top

    Powered by Savane 3.5