 |
| Author |
Message |
|
|
Posted: May 30, 2012 - 08:26 AM |
|

Joined: Jan 22, 2008
Posts: 2
|
|
Hi,
I have a problem with lock bits using AVRDUDE 5.11.
The microcontroller is a ATmega8.
Below the report.
Thank to all.
Launching C:\WinAVR-20100110\bin\avrdude -pm8 -cavrisp2 -Pusb -b115200 -u -Uflash:w:ELETTROBAR_BASE.hex:a -Ulfuse:w:0x23:m -Uhfuse:w:0xdf:m -Ulock:w:0xff:m
Output:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "ELETTROBAR_BASE.hex"
avrdude: input file ELETTROBAR_BASE.hex auto detected as Intel Hex
avrdude: writing flash (5762 bytes):
Writing | ################################################## | 100% 2.27s
avrdude: 5762 bytes of flash written
avrdude: verifying flash memory against ELETTROBAR_BASE.hex:
avrdude: load data flash data from input file ELETTROBAR_BASE.hex:
avrdude: input file ELETTROBAR_BASE.hex auto detected as Intel Hex
avrdude: input file ELETTROBAR_BASE.hex contains 5762 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.78s
avrdude: verifying ...
avrdude: 5762 bytes of flash verified
avrdude: reading input file "0x23"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x23:
avrdude: load data lfuse data from input file 0x23:
avrdude: input file 0x23 contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xdf"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xdf:
avrdude: load data hfuse data from input file 0xdf:
avrdude: input file 0xdf contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing lock (1 bytes):
Writing | ***failed;
################################################## | 100% 0.11s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0xff:
avrdude: load data lock data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x3f
avrdude: verification error; content mismatch
avrdude done. Thank you.
avrdude finished |
|
|
| |
|
|
|
|
|
Posted: May 30, 2012 - 10:28 AM |
|

Joined: Feb 12, 2005
Posts: 16550
Location: Wormshill, England
|
|
|
Quote:
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x3f
avrdude will always read bits 6,7 of lock as 0.
If you want to avoid the whingeing, ask for -Ulock:w:0x3f:m
You get a similar situation with efuse on modern AVRs.
The avrdude.conf entry will write 1s to unused bits
but read back an x bit (don't care) as a 0.
IMHO, avrdude.conf entries should be edited for better consistency. OTOH, you can do a workaround.
David. |
|
|
| |
|
|
|
|
|
Posted: May 30, 2012 - 02:26 PM |
|

Joined: Jan 22, 2008
Posts: 2
|
|
|
|
|
|
|
|
|