Hey guys, I am attempting an upload to a fresh Atmega3208 via a UPDI programmer (jtag2updi) and get the following error when attempting an upload:
avrdude error: bad response to read memory command: RSP_ILLEGAL_MCU_STATE
avrdude error: unable to read byte at address 0x0000
avrdude error: read operation not supported for memory signature
avrdude error: unable to read signature data for part ATmega3208, rc=-2
avrdude error: unable to read signature data, rc=-2
avrdude error: bad response to leave progmode command: RSP_ILLEGAL_MCU_STATE
After looking into this further, I tried various build flags to erase the chip first to attempt an unlock if it was locked (but I bought it freshly baked?), and to modify some fuse bits but to no avail. I also looked at related posts in this forum but haven’t found this exact scenario thus far (most don’t have issues on the initial read during programming). Has anyone else run into this similar issue or have ideas on what could be causing the behavior? I can entertain a wiring problem considering the initial read fails, but we are talking about one wire here so I am not sure how…
EDIT: Thought I’d add -v output:
avrdude: Version 7.1-arduino.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is /home/arch/.platformio/packages/tool-avrdude/avrdude.conf
User configuration file is /home/arch/.avrduderc
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : jtag2updi
Overriding Baud Rate : 115200
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 1
firmware version: 6.00
hardware version: 1
S_MCU:
boot-loader FW version: 1
firmware version: 6.00
hardware version: 1
Serial number: 00:00:00:00:00:00
Device ID: JTAGICE mkII
AVR Part : ATmega3208
RESET disposition : dedicated
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse0 wdtcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse1 bodcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse2 osccfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse4 tcd0cfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse5 syscfg0 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse6 syscfg1 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse7 append 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse8 bootend 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 10 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 1 0 0 0 0x00 0x00
tempsense 0 0 0 0 no 2 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 61 61 0 0 0 0x00 0x00
sernum 0 0 0 0 no 10 1 0 0 0 0x00 0x00
osccal16 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osccal20 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osc16err 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osc20err 0 0 0 0 no 2 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 1 0 0 0 0x00 0x00
userrow usersig 0 0 0 0 no 64 64 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 256 64 0 0 0 0x00 0x00
flash 0 0 0 0 no 32768 128 0 0 0 0x00 0x00
Programmer Type : JTAGMKII_UPDI
Description : JTAGv2 to UPDI bridge
M_MCU HW version: 1
M_MCU FW version: 6.00
S_MCU HW version: 1
S_MCU FW version: 6.00
Serial number : 00:00:00:00:00:00
Vtarget : 5.0 V