Impossibile programmare arduino uno: stk500_recv(): programmer is not responding

Ciao a tutti,

vi scrivo dopo aver esplorato buona parte delle soluzioni che google mi ha proposto sul tema, senza grandi risultati.

Ho acquistato la settimana scorsa uno elegoo uno r3 (perchè non un arduino originale? il progetto dove la devo incastrare dovrebbe costare il meno possibile). Uso l'ide arduino 1.8.5 su una macchina ubuntu linux 16.04 dove ho già programmato in passato la mia scheda digispark.
La scheda è collegata direttamente ad una porta USB 2 del mio PC.
Ho provato a giochicchiare un po' caricando qualche sketch demo di neopixel per provare a pilotare la serie di luci che ho acquistato. Dopo di che ho riposto tutto e ripreso in mano le cose qualche giorno dopo per cominciare a seguire un libro che ho che comincia proprio dalle basi. Vorrei caricare un firmware che fa una cosa molto stupida: scrive sulla seriale del testo intervallato da un delay(1000).

Vado per programmare e mi compare quest'errore:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

La scheda (alimentata via sub) a questo punto se ne resta con il led L acceso e il led del'alimentazione ON.

Ho trovato la procedura di recovery su arduino playground alla voce blocco. L'ho provata più e più volte, ma potrei essere sfortunato e non essere mai riuscito a beccare il timing corretto tra il rilascio del reset e l'avvio del flash. Ho provato anche a cablare un bottone per il reset esterno alla scheda che fosse più comodo da premere rispetto a quello sulla board, ma non è cambiato nulla.

Ho provato quindi a lanciare avrdude con una maggiore verbosity, come suggerito da più post trovati in giro per il web:

remixtj@ic1500957:~$ /home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_291860/sketch_jun13a.ino.hex:i -vvvv

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/home/remixtj/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

L'unica cosa che noto è che in corrispondenza delle righe

avrdude: Send: 0 [30]   [20]

Lampeggia il led RX sulla scheda. Ricerco altri post sul web e mi imbatto in questo post su stackoverflow che presenta una situazione simile alla mia. Provo nuovamente quanto indicato, ma senza successo. L'unica differenza che noto tra la mia situazione e la sua è che quando premo il tasto di reset, il led L non varia, mentre lui indica che il led si spegne e riaccende rapidamente.

Tra le varie cose che sospetto è che ci sia un problema con il cavo. Sostituisco il cavo e la situazione non varia. Provo, quindi, sia con il cavo nuovo, che con il cavo vecchio, a fare il loopback test che conferma che non ci sono problemi con la comunicazione USB.

Ho riprovato nuovamente la procedura di reset, che sembra l'unica speranza che ho per recuperare la scheda, ma non ne sono venuto fuori.

L'unica cosa che mi resta da provare è cambiare PC, ma non so se otterrò qualche risultato differente.

Vi chiedo un aiuto per uscire da questa fastidiosa situazione che mi da l'idea di aver buttato i soldi dopo solo 3 giorni...

Cos'altro posso provare a fare?

Grazie,

Luca

Banalmente, sui pin 0 e 1 non c'e' nulla di collegato, vero ?

La scheda non è collegata con niente, solo via USB.

Luca

  1. la scheda non ha più il bootloader
  2. hai notato questo msg che dice avrdude?
System wide configuration file is "/home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/home/remixtj/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

Qualcosa non va con il file di configurazione di avrdude ?!?

Ciao,

ho notato si, ma ci sta perchè non ho nessun file avrduderc, quindi mi affido alla configurazione standard.

E se non ha più il bootloader che si fa? Come posso eventualmente avere conferma di questa mancanza?

Ciao,

ho ordinato ieri un altra scheda dello stesso tipo da utilizzare con "Arduino as ISP", effettuando il cablaggio seguendo le indicazioni che ho trovato su Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer e impostando come programmer "Arduino as ISP".

Ho effettuato una prima prova cliccando su burn bootloader e questo è l'output:

 /home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/ttyACM1 -b19200 -Ulfuse:r:-:h -Uhfuse:r:-h.

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/remixtj/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/home/remixtj/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM1
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Ho riprovato aggiungendo un -F per forzare, ma il risultato è desolante:

output esecuzione con -F

Sembra quasi la scrittura venga fatta ma persa. Ho riprovato, anzichè scrivendo il bootloader, a sparare direttamente dentro il binario compilato di Blink sperando di vedere risultati diversi. Usando il -F (perchè senza dava lo stesso errore) l'output è questo: output flash blink

Penso che sia il caso di fare un reso ad amazon, ma vorrei capire meglio la situazione, anche per spiegarla in fase di reso.

remix_tj:
Ho riprovato aggiungendo un -F per forzare, ma il risultato è desolante:

MAI fare una cosa del genere ...
... se la MCU NON viene riconosciuta e inutile e dannoso usare la flag -F (... specie se non si conoscono i motivi).

Device signature = 0x000000 significa che NON vede proprio la MCU ... che pensi di poter "forzare" in questo caso ? Evidentemente o sono sbagliati i collegamenti o è morta la MCU.

Guglielmo

Ho ricontrollato i collegamenti per la programmazione e mi risultano corretti. Dato il problema sembra che non funzioni la MCU. Provo a fare un reso.

Luca

Riporta qui i collegamenti che hai fatto che verifichiamo ... ::slight_smile:

Guglielmo

Allora, i collegamenti che ho fatto sono i seguenti:

Programmer Uno Target Uno
D10 (SS) Reset
D11 (MOSI) D11
D12 (MISO) D12
D13 (SCK) D13
Gnd Gnd
+5V +5V

Sull'Uno utilizzato per il programmer ho caricato lo sketch arduinoISP e impostato come programmer "Arduino as ISP"

... purtroppo ... è tutto esatto, quindi, probabilmente, è morta la MCU :frowning:

Guglielmo

Grazie...

come dicevo nella presentazione, io con l'elettronica non ci vado d'accordo!