I am having quite a bit of trouble with the fuse bits and I have 4 chips which exhibit this issue. I am able to program the chip with the default factory settings and it functions fine. However, I need to use a 16Mhz external crystal. So I have that hooked up between the two XTAL pins with two 22pF caps to gnd.
I use the following to program the fuses:
fuse:
avrdude -u -pm32 -cbsd -E noreset -U lfuse:w:0x5f:m
avrdude -u -pm32 -cbsd -E noreset -U hfuse:w:0xd1:m
programming the fuses fails with the following:
[code]
C:\Documents and Settings\Chrispy\Desktop\a>make fuse
avrdude -u -pm32 -cbsd -E noreset -U lfuse:w:0x5f:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9502
avrdude: reading input file "0x5f"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x5f:
avrdude: load data lfuse data from input file 0x5f:
avrdude: input file 0x5f contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude done. Thank you.
avrdude -u -pm32 -cbsd -E noreset -U hfuse:w:0xd1:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x000102
avrdude: current erase-rewrite cycle count is -2130837761 (if being tracked)
avrdude: reading input file "0xd1"
avrdude: writing hfuse (1 bytes):
Writing | | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.06s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd1:
avrdude: load data hfuse data from input file 0xd1:
avrdude: input file 0xd1 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xd1 != 0x00
avrdude: verification error; content mismatch
avrdude done. Thank you.
make: *** [fuse] Error 1
[/code]
>From this point on, the fuse bits now read
[code]C:\Documents and Settings\Chrispy\Desktop\a>avrdude -c bsd -p m32 -t
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000102
avrdude: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude: safemode is enabled, you will NOT be able to change the fuse bits. Use
-u option to disable
avrdude> d lfuse
>>> d lfuse
0000 00 |. |
avrdude> d hfuse
>>> d hfuse
0000 00 |. |
avrdude> d lock
>>> d lock
0000 00 |. |
avrdude>
[/code]
I do not know why programming the fuses would make the chip completely non-functional. I did not program the lock bits either so this is very puzzling. Any attempt to program the chip results in a similar verification error with first mismatch at 0x000.
I would appreciate anyone's help. I have 4 chips with this issue.
Thanks in advance,
Chris
_______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
