ElTangas / jtag2updi

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

Unable to program ATMega4809 #62

Closed vjkolaventy closed 2 years ago

vjkolaventy commented 2 years ago

Hi

I am trying to program ATMega4809 on a custom PCB but it does not seem to work. I have a I2C OLED display that I am getting to work. I tried the example sketch but it does not work. I think that the program is not uploading. Do I need to do anything to unlock the chip before programming? Thanks in advance. Please below log.

Sketch uses 19939 bytes (40%) of program storage space. Maximum is 49152 bytes. Global variables use 181 bytes (2%) of dynamic memory, leaving 5963 bytes for local variables. Maximum is 6144 bytes. C:\Users\Vijay\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\Vijay\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10/avrdude.conf -v -patmega4809 -cjtag2updi -PCOM4 -Uflash:w:C:\Users\Vijay\AppData\Local\Temp\arduino_build_478200/test1.ino.with_bootloader.hex:i -Ufuse0:w:0x00:m -Ufuse1:w:0x14:m -Ufuse2:w:0x02:m -Ufuse4:w:0x00:m -Ufuse5:w:0b11001001:m -Ufuse6:w:0x06:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Ulock:w:0xC5:m

avrdude: Version 6.3-20201216 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\Vijay\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10/avrdude.conf"

     Using Port                    : COM4
     Using Programmer              : jtag2updi

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 : ATmega4809 Chip Erase delay : 0 us PAGEL : P00 BS2 : P00 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 0 StabDelay : 0 CmdexeDelay : 0 SyncLoops : 0 ByteDelay : 0 PollIndex : 0 PollValue : 0x00 Memory Detail :

                              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
       prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
       fuses          0     0     0    0 no          9    0      0     0     0 0x00 0x00
       fuse0          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse1          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse2          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse4          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse5          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse6          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse7          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       fuse8          0     0     0    0 no          1    0      0     0     0 0x00 0x00
       lock           0     0     0    0 no          1    0      0     0     0 0x00 0x00
       data           0     0     0    0 no          0    0      0     0     0 0x00 0x00
       usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
       flash          0     0     0    0 no      49152  128      0     0     0 0x00 0x00
       eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

     Programmer Type : JTAGMKII_PDI
     Description     : JTAGv2 to UPDI bridge
     M_MCU hardware version: 1
     M_MCU firmware version: 6.00
     S_MCU hardware version: 1
     S_MCU firmware version: 6.00
     Serial number:          00:00:00:00:00:00
     Vtarget         : 5.0 V

avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x1e9651 (probably m4809) avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "C:\Users\Vijay\AppData\Local\Temp\arduino_build_478200/SW1.0_HW2.4_70by50mm.ino.with_bootloader.hex" avrdude: writing flash (19940 bytes):

Writing | ################################################## | 100% 3.84s

avrdude: 19940 bytes of flash written avrdude: verifying flash memory against C:\Users\Vijay\AppData\Local\Temp\arduino_build_478200/SW1.0_HW2.4_70by50mm.ino.with_bootloader.hex: avrdude: load data flash data from input file C:\Users\Vijay\AppData\Local\Temp\arduino_build_478200/SW1.0_HW2.4_70by50mm.ino.with_bootloader.hex: avrdude: input file C:\Users\Vijay\AppData\Local\Temp\arduino_build_478200/SW1.0_HW2.4_70by50mm.ino.with_bootloader.hex contains 19940 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.83s

avrdude: verifying ... avrdude: 19940 bytes of flash verified avrdude: reading input file "0x00" avrdude: writing fuse0 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse0 written avrdude: verifying fuse0 memory against 0x00: avrdude: load data fuse0 data from input file 0x00: avrdude: input file 0x00 contains 1 bytes avrdude: reading on-chip fuse0 data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ... avrdude: 1 bytes of fuse0 verified avrdude: reading input file "0x14" avrdude: writing fuse1 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse1 written avrdude: verifying fuse1 memory against 0x14: avrdude: load data fuse1 data from input file 0x14: avrdude: input file 0x14 contains 1 bytes avrdude: reading on-chip fuse1 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse1 verified avrdude: reading input file "0x02" avrdude: writing fuse2 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse2 written avrdude: verifying fuse2 memory against 0x02: avrdude: load data fuse2 data from input file 0x02: avrdude: input file 0x02 contains 1 bytes avrdude: reading on-chip fuse2 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse2 verified avrdude: reading input file "0x00" avrdude: writing fuse4 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse4 written avrdude: verifying fuse4 memory against 0x00: avrdude: load data fuse4 data from input file 0x00: avrdude: input file 0x00 contains 1 bytes avrdude: reading on-chip fuse4 data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ... avrdude: 1 bytes of fuse4 verified avrdude: reading input file "0b11001001" avrdude: writing fuse5 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse5 written avrdude: verifying fuse5 memory against 0b11001001: avrdude: load data fuse5 data from input file 0b11001001: avrdude: input file 0b11001001 contains 1 bytes avrdude: reading on-chip fuse5 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse5 verified avrdude: reading input file "0x06" avrdude: writing fuse6 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse6 written avrdude: verifying fuse6 memory against 0x06: avrdude: load data fuse6 data from input file 0x06: avrdude: input file 0x06 contains 1 bytes avrdude: reading on-chip fuse6 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse6 verified avrdude: reading input file "0x00" avrdude: writing fuse7 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse7 written avrdude: verifying fuse7 memory against 0x00: avrdude: load data fuse7 data from input file 0x00: avrdude: input file 0x00 contains 1 bytes avrdude: reading on-chip fuse7 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse7 verified avrdude: reading input file "0x00" avrdude: writing fuse8 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse8 written avrdude: verifying fuse8 memory against 0x00: avrdude: load data fuse8 data from input file 0x00: avrdude: input file 0x00 contains 1 bytes avrdude: reading on-chip fuse8 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of fuse8 verified avrdude: reading input file "0xC5" avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0xC5: avrdude: load data lock data from input file 0xC5: avrdude: input file 0xC5 contains 1 bytes avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ... avrdude: 1 bytes of lock verified

avrdude done. Thank you

vjkolaventy commented 2 years ago

Sorry. The program seems to be working. Please don't bother