0
\$\begingroup\$

I cannot update the program on my ATMega328p-AU (with the old version of the Arduino nano bootloader burnt to it). Oddly enough I can still talk to the program running on the uC (query and read out some values, switch stuff on and off) via serial. I am using the Arduino IDE for programming and serial communication.

I first tried using two different USB-TTL programmers. The 0.1 uF cap between DTR and Reset is on the board hosting the uC. The error was stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 (whole error below).

Then I used an Arduino Nano (328p, old bootloader) with the ArduinoISP sketch flashed to it. I can neither reprogram the sketch nor reburn the boot loader. The error given is (whole error below):

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

I am afraid of using the -F option as I fear the uC will stop working altogether.

Is my uC bricked and just working by chance? I have checked and rewired the connections many times, and I am confident that they are correct.

Error using USB-TTL programmer:

Sketch uses 12774 bytes (41%) of program storage space. Maximum is 30720 bytes.
Global variables use 611 bytes (29%) of dynamic memory, leaving 1437 bytes for local variables. Maximum is 2048 bytes.
/opt/arduino-1.8.10/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_408838/nixie.ino.hex:i
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 "/opt/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/user/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0

avrdude done.  Thank you.

An error occurred while uploading the sketch

Error using Arduino Nano as ISP or using it to burn the bootloader:

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 "/opt/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/user/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         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)

An error occurred while uploading the sketch
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.
\$\endgroup\$
1
  • \$\begingroup\$ the actual avrdude command is on the 3rd line of your printout ... run it from a terminal window just after you reset the board .... /opt/arduino-1.8.10/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_408838/nixie.ino.hex:i ... you can also compile a simple LED blink sketch and do the same thing in case the nixie sketch has a problem \$\endgroup\$
    – jsotola
    Apr 4, 2020 at 16:14

2 Answers 2

1
\$\begingroup\$

yes, that's what programming fuses are for.

We wouldn't call that "bricked", though.

"Bricked" is a relatively new term that describes a device that was converted from functional device (which yours still is) to something that is only useful as paperweight/building material.

\$\endgroup\$
2
  • \$\begingroup\$ What are ways this could have happened? I was not actively trying to set any fuses. Should I be able to use a high voltage serial programmer to get it back working? \$\endgroup\$
    – stebu92
    Apr 4, 2020 at 12:45
  • 1
    \$\begingroup\$ transmission errors? errors in an ELF file you've uploaded? Bugs in the programmer? I don't know, to be honest. \$\endgroup\$ Apr 4, 2020 at 12:49
1
\$\begingroup\$

I had something similar happen with an Arduino uno, if your program is outputting on serial you are blocking programming. You need to upload a sketch (ie blink) and reset the Arduino at just the right time when it will start the transfer. A few tries may be necessary to get the timing right. If you succeed, I recommend you place a Delay loop in your future program to give you some programming window time before flooding the serial port with data...

\$\endgroup\$
1
  • \$\begingroup\$ But if that were the only problem, I should be able to program it using the MISO/MOSI interface, wouldn't I? \$\endgroup\$
    – stebu92
    Apr 4, 2020 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.