Sketch upload problems

Hello everyone.
I’m quite green with Arduino even if I’m a seasoned C++ developer.
I did some experiments with an Arduino Uno clone and then decided to get some Arduino Nano Every (not clones) to go on.
At first everything seemed to work flawlessly.
After a short while, well, it stopped…

With each of my Arduino Nano Every I tried to do this:

  • Code a simple variation of the blink sketch, using a potientiometer to change the blink speed.
  • I managed to upload it and to make it work.
  • At a given point I wasn’t able anymore to upload my sketch.

The errors I get:

avrdude: jtagmkII_initialize(): Cannot locate “flash” and “boot” memories in description
avrdude: jtagmkII_reset(): timeout/error communicating with programmer (status -1)
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: jtagmkII_close(): 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)

I still can get board info:

BN: Arduino Nano Every
VID: 2341
PID: 0058
SN: C54633FD51514746304B2020FF0A2B0A

I used the correct board type (Arduino megaAVR boards/Arduino Nano Every) and the correct COM port.

I don’t think I fried all 3 units… did I?

Any help will be appreciated, grazie.

Turn on all verbose output and post everything that is output in the IDE below when flashing.
IDE > File > Settings

Here you are the verbose output:

D:\Sviluppo\Arduino\TestEvery\TestEvery\TestEvery.ino: In function ‘float GetRangedPotVal(uint8_t)’:
D:\Sviluppo\Arduino\TestEvery\TestEvery\TestEvery.ino:29:31: warning: unused parameter ‘pin’ [-Wunused-parameter]
float GetRangedPotVal(uint8_t pin)
^~~
Sketch uses 4725 bytes (9%) of program storage space. Maximum is 49152 bytes.
Global variables use 179 bytes (2%) of dynamic memory, leaving 5965 bytes for local variables. Maximum is 6144 bytes.
Forcing reset using 1200bps open/close on port COM3
C:\Users\Orf Quarenghi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Orf Quarenghi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega4809 -cjtag2updi -PCOM3 -b115200 -e -D -Uflash:w:C:\Users\ORFQUA~1\AppData\Local\Temp\arduino_build_512427/TestEvery.ino.hex:i -Ufuse2:w:0x01:m -Ufuse5:w:0xC9:m -Ufuse8:w:0x00:m {upload.extra_files}

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

     System wide configuration file is "C:\Users\Orf Quarenghi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM3
     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: 1.07
hardware version: 1
S_MCU:
boot-loader FW version: 1
firmware version: 6.07
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: 1.07
     S_MCU hardware version: 1
     S_MCU firmware version: 6.07
     Serial number:          00:00:00:00:00:00
     Vtarget         : 5.0 V

avrdude: jtagmkII_initialize(): Cannot locate “flash” and “boot” memories in description
avrdude: jtagmkII_reset(): timeout/error communicating with programmer (status -1)
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: jtagmkII_close(): 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.

Today I tested all the 3 Every, two now behave correctly, only one persists in its uncollaborative attitude - as shown in the post above…
I have read several posts about some Every coming back to its senses avter a good sleep…
Well, I can’t understand :frowning:

Hi,

I still wanted to see the Device Signature. The output should look like your others.

avrdude: Device signature = 0x1e9651 (probably m4809)

As a test if it can address the µC at all. But I suspect the EveryBoard is defective, if the signature is not readable. If you can claim it, then exchange it.

I can read Board Info:

BN: Arduino Nano Every
VID: 2341
PID: 0058
SN: C54633FD51514746304B2020FF0A2B0A

This means that at least I can address the microcontroller, right?

The VID, PID and SN will probably be in the USB-UPDI converter SAMD11. Do you get a signature when you try to flash avrdude? This can only come from the ATmega4809. If the signature cannot be read, the access or the connection to the actual µC is disturbed.

I beg your pardon, I’m really green in the Arduino ecosystem and I am possibly about to ask a very stupid question: when you say “flash avrdude” you are talking about re-install the boot-loader?

It does not matter. No I meant when the IDE wants to transfer the sketch. For this the IDE uses avrdude. If the signature of the µC to be flashed cannot be read, then something does not work. For self flashing without IDE no pins are led to the outside. Reject the board. Something is defective at it.

Ok, thank you :slight_smile: