Programming Femtoduino with ArduinoISP programmer

Hello, I want to flash my Femtoduino via ISP programmer as I intend to change fuse bits for readout protection.

For this purpose I bought the Arduino ISP R3 Programmer
(Product number A000092).

I installed a clean version of Arduino 1.5.8 IDE and tried to flash the Blink File as described on the aforementioned Arduino ISP page.

As the Femtoduino is usually regarded as Arduino Uno (e.g. here), I used the these settings for flashing.

Unfortunately it does not work but ends with the following error message:

Using Port : usb
Using Programmer : arduinoisp
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x2341-0x0049
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : USBtiny
Description :
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 53 00]
avrdude: AVR device initialized and ready to accept instructions

Reading | CMD: [30 00 00 00] [00 30 00 1e]
CMD: [30 00 01 00] [00 30 00 95]
################CMD: [30 00 02 00] [00 30 00 0f]
################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
CMD: [ac 80 00 00] [00 ac 80 00]
avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 ac 53 00]
avrdude: reading input file "C:\Users\AppData\Local\Temp\build5136853707081851615.tmp/Blink.cpp.hex"
avrdude: writing flash (1030 bytes):

Writing | CMD: [4c 00 00 00] [08 4c 00 00]
#####CMD: [4c 00 40 00] [e0 4c 00 40]
######CMD: [4c 00 80 00] [93 4c 00 80]
#####CMD: [4c 00 c0 00] [01 4c 00 c0]
######CMD: [4c 01 00 00] [81 4c 01 00]
#####CMD: [4c 01 40 00] [00 4c 01 40]
######CMD: [4c 01 80 00] [b7 4c 01 80]
#####CMD: [4c 01 c0 00] [cf 4c 01 c0]
######CMD: [4c 02 00 00] [ff 4c 02 00]

| 100% 3.31s

avrdude: 1030 bytes of flash written
avrdude: verifying flash memory against C:\Users\AppData\Local\Temp\build5136853707081851615.tmp/Blink.cpp.hex:
avrdude: load data flash data from input file C:\Users\AppData\Local\Temp\build5136853707081851615.tmp/Blink.cpp.hex:
avrdude: input file C:\Users\AppData\Local\Temp\build5136853707081851615.tmp/Blink.cpp.hex contains 1030 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.91s

avrdude: avr_read(): skipping page 9: no interesting data
.
.
.
avrdude: avr_read(): skipping page 255: no interesting data
avrdude: verifying ...
avrdude: 1030 bytes of flash verified

avrdude done. Thank you.

Something must have been written to the Femtoduino, as the old bootloader doesn't work anymore.

I would be glad if someone of you might give me some starting help with this.

Thanks a lot.

Are you sure the LED connected to D13 is working? Does it blink while you do the upload (D13 is the SPI clock).

Thank you for the fast answer.

Yes, the LED is lit up and slightly flickering, when uploading via programmer.

It is also possible to restore the bootloader by burning it back onto the Femto.

I might add the info, that when calling avrdude from command line:

avrdude -C C:\avrdude.conf -v -v -v -v -patmega328p -carduinoisp  -Uflash:w:C:\Users\AppData\Local\Temp\build5136853707081851615.tmp/Blink.cpp.hex:i

, it claims to have successfully written the Blink sketch to the Femto. However, there seems to be no sketch running.

These are the messages:

Writing | ######################
01 00 00] [81 4c 01 00]
Writing | ############################
01 40 00] [00 4c 01 40]
Writing | #################################
01 80 00] [b7 4c 01 80]
Writing | #######################################
01 c0 00] [cf 4c 01 c0]
Writing | ############################################
02 00 00] [ff 4c 02 00]
Writing | ##################################################

avrdude: 1030 bytes of flash written
avrdude: verifying flash memory against C:\Users\AppD
d5136853707081851615.tmp/Blink.cpp.hex:
avrdude: load data flash data from input file C:\Users\build5136853707081851615.tmp/Blink.cpp.hex:
avrdude: input file C:\Users\AppData\Local\Temp\build
.tmp/Blink.cpp.hex contains 1030 bytes
avrdude: reading on-chip flash data:

Reading | ##################################################

avrdude: avr_read(): skipping page 9: no interesting data
.
.
.
avrdude: avr_read(): skipping page 255: no interesting data
avrdude: verifying ...
avrdude: 1030 bytes of flash verified

CMD: [50 00 00 00] [ff 50 00 ff]
avrdude: safemode read 1, lfuse value: ff
CMD: [50 00 00 00] [00 50 00 ff]
avrdude: safemode read 2, lfuse value: ff
CMD: [50 00 00 00] [00 50 00 ff]
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
CMD: [58 08 00 00] [00 58 08 de]
avrdude: safemode read 1, hfuse value: de
CMD: [58 08 00 00] [00 58 08 de]
avrdude: safemode read 2, hfuse value: de
CMD: [58 08 00 00] [00 58 08 de]
avrdude: safemode read 3, hfuse value: de
avrdude: safemode: hfuse reads as DE
CMD: [50 08 00 00] [00 50 08 fd]
avrdude: safemode read 1, efuse value: 5
CMD: [50 08 00 00] [00 50 08 fd]
avrdude: safemode read 2, efuse value: 5
CMD: [50 08 00 00] [00 50 08 fd]
avrdude: safemode read 3, efuse value: 5
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK (H:05, E:DE, L:FF)

avrdude done. Thank you.

Normal Uno Fuses:
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05

So that looks good.
Other settings from boards.txt are 16 MHz
uno.build.f_cpu=16000000L
and serial transfer speed
uno.upload.speed=115200

Are you using Uno as the board type when uploading?

That's correct these are the values I use.

When uploading my sketch using the programmer I have selected Arduino Uno as board and ArduinoISP as programmer.

No suggestions anyone?