Hi there,
I've been using RBBBs (http://moderndevice.com/RBBB_revB.shtml) quite successfully for a little while now, without any problems. I don't have an programmer, so I just develop using an FTDI cable and the diecimila bootloader. (This is pretty close to the vanilla arduino hardware setup.) However, this afternoon, I did something stupid with my hardware which caused a strobing brownout (semi-random cycles of 0 to 2.5V repeating over and over) to the atmega168 chip. Never having had any problems with this before, I decided to take a few seconds to investigate the issue with a meter while the system was on.
I eventually just reverted the hardware change and thought everything was OK again. I took me a little while afterwards to realise that something strange had happened: the atmega168 still booted and ran my software perfectly, with no apparent errors, but I was unable to download anything new to the chip. I use a command-line setup to download using avrdude; it writes fine, but always fails the verification operation.
Confused, I took another RBBB I had lying around and tested that one. No problems, so it's likely not the cable. Then, I swapped the atmega168 chips from one board to the other: the strangely-behaving chip still exhibited the same issue on the other board, while the "mint" chip was fine on the board that initially carried the strangely-behaving chip. Thus, it's not likely to be the board, either.
I'm having no problems downloading (except for verification and the obvious fact that the old code is still there), so I'm guessing the bootloader software is still intact. Like I said above, the software I last downloaded into flash runs just fine and everything seems normal, with the only exception of being unable to download new software.
Does anyone think it's somehow possible the lock bits on my chip were toggled by the brownout, preventing future writes to flash? If so, though avrdude provides options to change the lock/lfuse/hfuse/efuse bits, I believe it is only possible to do so with an ICSP programmer. Is this correct?
Below is an example of the errors I get using avrdude:
abuild.bat: avrdude -C "C:\Program Files\arduino-0012\hardware\tools\avr\etc\avr
dude.conf" -p atmega168 -P COM5 -c stk500v1 -D -b 19200 -U "flash:w:.\obj\Blink.
pde.hex"
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9406
avrdude: reading input file ".\obj\Blink.pde.hex"
avrdude: input file .\obj\Blink.pde.hex auto detected as Intel Hex
avrdude: writing flash (1096 bytes):
Writing | ################################################## | 100% 0.83s
avrdude: 1096 bytes of flash written
avrdude: verifying flash memory against .\obj\Blink.pde.hex:
avrdude: load data flash data from input file .\obj\Blink.pde.hex:
avrdude: input file .\obj\Blink.pde.hex auto detected as Intel Hex
avrdude: input file .\obj\Blink.pde.hex contains 1096 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.84s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
0x5a != 0x5c
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Thanks to anyone for any insight!