ElTangas / jtag2updi

UPDI programmer software for Arduino (targets Tiny AVR-0/1/2, Mega AVR-0 and AVR-DA/DB MCUs)
MIT License
318 stars 91 forks source link

Can't program with verify without power-cycle on DxCore (AVR32DD14) #70

Open pcfreak1201 opened 1 year ago

pcfreak1201 commented 1 year ago

I've tested on a Arduino-ProMini with CH340 with your code and SpenceKonde's fork - same problem:

Command-line: /home/stefan/.arduino15/packages/DxCore/tools/avrdude/6.3.0-arduino17or18/bin/avrdude -C/home/stefan/.arduino15/packages/DxCore/hardware/megaavr/1.5.3/avrdude.conf -v -pavr32dd14 -cjtag2updi -P/dev/ttyUSB0 -Ufuse5:w:0b11011001:m -Ufuse6:w:0b00001100:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Uflash:w:/tmp/arduino_build_610810/Blink.ino.hex:i

1st - programming / writing is OK: (only last line)

Writing | ################################################## | 100% 0.25s

avrdude: 790 bytes of flash written

2nd when the verify begins:

avrdude: verifying flash memory against /tmp/arduino_build_610810/Blink.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_610810/Blink.ino.hex:
avrdude: input file /tmp/arduino_build_610810/Blink.ino.hex contains 790 bytes
avrdude: reading on-chip flash data:

Reading | avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1) avrdude: jtagmkII_paged_load(): bad response to read memory command: RSP_NO_TARGET_POWER #########################avrdude: jtagmkII_recv(): msglen 167772161 exceeds max message size 100000, ignoring message avrdude: jtagmkII_recv(): msglen 167772161 exceeds max message size 100000, ignoring message avrdude: jtagmkII_recv(): msglen 167772161 exceeds max message size 100000, ignoring message avrdude: jtagmkII_recv(): msglen 167772161 exceeds max message size 100000, ignoring message

avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): fatal timeout/error communicating with programmer (status -1)
avr_read(): error reading address 0x0000
    read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: jtagmkII_program_disable(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)

avrdude done.  Thank you.

After that the DUT stops working and the ProMini has to power-cycle and all work again. Verify without programming, after that, also works. Any ideas?