Ok, I was playing around trying to extract the flash from my arduino mega2560 with a USBasp.
I was using the eXtreme Burner - AVR to extract it and it was reading the flash, but somehow the mega2560 stopped working completely.
I could not connect to it anymore with the USBasp with avrdude.
The error I get is always the same:
avrdude.exe -vvvv -c usbasp -p atmega2560 -b 19200 -t -F
avrdude: Version 7.3
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is D:\ARDUINO\avrdude-v7.3-windows-x64\avrdude.conf
Using port : usb
Using programmer : usbasp
Setting baud rate : 19200
avrdude: usbasp_open("usb")
avrdude: seen device from vendor >www.fischl.de<
avrdude: seen product >USBasp<
AVR Part : ATmega2560
Programming modes : ISP, HVPP, JTAG, SPM
Memory Size Pg size
----------------------------
eeprom 4096 8
flash 262144 256
efuse 1 1
hfuse 1 1
lfuse 1 1
lock 1 1
signature 3 1
calibration 1 1
io 480 1
sram 8192 1
Variants Package F max T range V range
----------------------------------------------------------------
ATmega2560 TQFP100 16 MHz [N/A, N/A] [4.5 V, 5.5 V]
ATmega2560-16AU TQFP100 16 MHz [-40 C, 85 C] [4.5 V, 5.5 V]
ATmega2560-16AUR TQFP100 16 MHz [N/A, N/A] [4.5 V, 5.5 V]
ATmega2560-16CU CBGA100 16 MHz [-40 C, 85 C] [4.5 V, 5.5 V]
ATmega2560V-8AU TQFP100 8 MHz [-40 C, 85 C] [1.8 V, 5.5 V]
ATmega2560V-8AUR TQFP100 8 MHz [-40 C, 85 C] [1.8 V, 5.5 V]
ATmega2560V-8CU CBGA100 8 MHz [-40 C, 85 C] [1.8 V, 5.5 V]
Programmer Type : usbasp
Description : USBasp ISP and TPI programmer
avrdude: usbasp_initialize()
avrdude: usbasp_transmit("USBASP_FUNC_GETCAPABILITIES", 0x00, 0x00, 0x00, 0x00)
<= [01] [00] [00] [00]
avrdude: usbasp_spi_set_sck_period(0)
avrdude: auto set sck period (because given equals null)
avrdude: usbasp_transmit("USBASP_FUNC_SETISPSCK", 0x00, 0x00, 0x00, 0x00)
<= [00]
avrdude: usbasp_transmit("USBASP_FUNC_CONNECT", 0x00, 0x00, 0x00, 0x00)
avrdude: usbasp_program_enable()
avrdude: usbasp_transmit("USBASP_FUNC_ENABLEPROG", 0x00, 0x00, 0x00, 0x00)
<= [01]
avrdude usbasp_spi_program_enable() [usbasp.c:784] error: program enable: target does not answer (0x01)
avrdude main() [main.c:1527] error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower the bit clock frequency, e.g. -B 125kHz
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x000000 (retrying)
avrdude: device signature = 0x000000 (retrying)
avrdude: device signature = 0x000000
avrdude main() [main.c:1636] error: Yikes! Invalid device signature.
avrdude main() [main.c:1652] warning: expected signature for ATmega2560 is 1E 98 01
The config command from avrdude:
avrdude> config
avrdude: usbasp_spi_cmd(0x50, 0x00, 0x00, 0x00) ...
avrdude: usbasp_transmit("USBASP_FUNC_TRANSMIT", 0x50, 0x00, 0x00, 0x00)
<= [00] [00] [00] [00]
avrdude: usbasp_spi_cmd() => 0x00, 0x00, 0x00, 0x00
config sut_cksel=extclk_6ck_0ms # 0
config ckout=gpio_pe7 # 0
config ckdiv8=by_8 # 0
avrdude: usbasp_spi_cmd(0x58, 0x08, 0x00, 0x00) ...
avrdude: usbasp_transmit("USBASP_FUNC_TRANSMIT", 0x58, 0x08, 0x00, 0x00)
<= [00] [00] [00] [00]
avrdude: usbasp_spi_cmd() => 0x00, 0x00, 0x00, 0x00
config bootrst=boot_section # 0
config bootsz=bs_4096w # 0
config eesave=ee_preserved # 0
config wdton=wdt_always_on # 0
config spien=isp_enabled # 0
config jtagen=jtag_enabled # 0
config ocden=ocd_enabled # 0
avrdude: usbasp_spi_cmd(0x50, 0x08, 0x00, 0x00) ...
avrdude: usbasp_transmit("USBASP_FUNC_TRANSMIT", 0x50, 0x08, 0x00, 0x00)
<= [00] [00] [00] [00]
avrdude: usbasp_spi_cmd() => 0x00, 0x00, 0x00, 0x00
config bodlevel=0 # reserved
avrdude: usbasp_spi_cmd(0x58, 0x00, 0x00, 0x00) ...
avrdude: usbasp_transmit("USBASP_FUNC_TRANSMIT", 0x58, 0x00, 0x00, 0x00)
<= [00] [00] [00] [00]
avrdude: usbasp_spi_cmd() => 0x00, 0x00, 0x00, 0x00
config lb=prog_ver_disabled # 0
config blb0=lpm_spm_disabled_in_app # 0
config blb1=lpm_spm_disabled_in_boot # 0
And it happened now even with my UNO m328p when I tried to extract the FW. It now also can't read out the signature of the device and the same issue is happening.
Any ideas. Fuses?


