Go Down

Topic: What actually happens to the ATmega 328P chip when it "breaks" ? (Read 521 times) previous topic - next topic

BabyGeezer

i encountered the avrdude: stk500_getsync(): not in sync: resp=0x00 error on a Nano and executed the following trouble-shooting steps;

1) Loop-back test works fine - so the USB-to-TTL chip is okay - meaning it "must be" (?) the ATmega chip.

2) Performed the chip-detector sketch by Nick Gammon from this post https://forum.arduino.cc/index.php?topic=268755.msg2113631#msg2113631 and the result was "Failed to enter programming mode. Double-check wiring!"

this is when i began to accept the Nano was a lost cause.


HOWEVER, i have since got a new ATmega 328P chip and been burning a bootloader onto it to make a "Breadboard Arduino" (also following the Nick Gammon pages).

it just occurred to me that "Failed to enter programming mode. Double-check wiring!" also appears if i wrongly try to burn a Uno bootloader onto a breadboard setup without a crystal present (minimal configuration).

SO; the question is, is it possible that the Nano ATmega chip is actually okay and that what happened is that the bootloader somehow got corrupted - is this even possible (say, from power surge issues) ?
(eg. resetting fuses and what-not.)

which leaves me thinking of performing one more option (to rescue the Nano) - to go ahead and try burning a bootloader anyway (instead of just performing a chip detect test).

would appreciate any feedback on this planned course of action - i don't want to end up compounding the problem since i don't know what the actual issue with the 328P chip is and "just trying to burn a bootloader" might make things worse from a (possibly) salvageable situation.

wilykat

You can try to burn bootloader anyway, Nano should have the 6 pins ICSP header for this reason.  You can't make it "worse", Arduino IDE will simply refuse to burn if there's error or if you selected the wrong board to burn bootloader.

It's also possible your bootloader is fine, and the issue is somewhere else. If you have a meter, check that the reset pin is being held at 5v, 5v are present on Vcc pins, and if you have oscilloscope somewhere, check that xtal is clocking.  One of my Uno clone arrived DOA because it had a bad crystal.

BabyGeezer

You can try to burn bootloader anyway, Nano should have the 6 pins ICSP header for this reason.  You can't make it "worse",
thanks so much for your response, i'll go ahead and try that then.
(i'll just be using 6 separate jumpers though, i don't have an ICSP-cable)


It's also possible your bootloader is fine, and the issue is somewhere else. If you have a meter, check that the reset pin is being held at 5v, 5v are present on Vcc pins,
this would be when it is just powered on, right ? (it doesn't have to be while it is actively bootloader-burning ?)


and if you have oscilloscope somewhere, check that xtal is clocking.  One of my Uno clone arrived DOA because it had a bad crystal.
i have no access to an oscilloscope :( - but if it is a bad crystal, i could try uploading a "Lilypad" bootloader that would use the internal 8 MHz oscillator to bypass the bad crystal, right ?
(or does that only work on a bare ATMega 328P on a breadboard setup ?)

westfw

I think most Nanos do not have the "overvoltage on reset" fix https://code.google.com/archive/p/arduino/issues/572, which COULD (maybe) lead to corrupting the bootloader.  "Throughout history" there have been reports of the bootloader somehow being corrupted by a user sketch.  I don't think we've ever tracked down exactly what happens (this SHOULD NOT be possible.  But it's happened to me, too.)

Certainly re-programming the bootloader is on a "broken" arduino is worth a try.

BabyGeezer

....
which COULD (maybe) lead to corrupting the bootloader.  "Throughout history" there have been reports of the bootloader somehow being corrupted by a user sketch.  I don't think we've ever tracked down exactly what happens (this SHOULD NOT be possible.  But it's happened to me, too.)
thanks for your input, if senior "electronicians" (?!) also see this as an indefinite situation, i don't feel as lost in my ignorance.

i tried to read up on what those "fuse bits" are but i guess there's just no tracking what went on to disturb the inside of the 328 chip from its normal condition.

what's frustrating is i don't even know what caused the issue exactly, but it's very likely a situation of stray power getting through from sloppy connections relating to the external power source. (which was "only 9V" anyway - supposedly within the limits)


Certainly re-programming the bootloader is on a "broken" arduino is worth a try.
but resulted in no cigar :(
Error while burning bootloader.
"avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check."

i did some measuring on the Nano pins using the Uno as a voltmeter with analogRead() and found that;
5V was only 4.68V
3v3 showed 3.48V
RST showed 4.66V


i suppose the most likely conclusion is that a physical change has occurred on the board, still can't tell if the 328P itself is usable.

i guess the next possible step is to get a cheap Nano clone and swap 328P's and see what happens.

westfw

If you've truly damaged the chip, then the ways it could be damaged are ... very many.
You're probably talking upward of 100,000 transistors for the entire chip.


Quote
"avrdude: Yikes!  Invalid device signature.
Turning on "verbose" mode for upload (in preferences) will give more details.
Usually a signature of 0 or -1 means misconnections or no clocking (but it's hard to tell which, and it could be other things as well.  A three-digit value of non-0/-1 would mean corruption of ROM/Flash areas that aren't supposed to be user-writeable.)
You CAN do analysis to get a better idea of what happened, but ... usually a board has to cost a lot more than $50 before this becomes economically worthwhile.


BabyGeezer

If you've truly damaged the chip, then the ways it could be damaged are ... very many.
You're probably talking upward of 100,000 transistors for the entire chip.
ahh, i see - it really is "digital" then - it's either Broken or NOT Broken - no varying degrees of "fixability" !


Turning on "verbose" mode for upload (in preferences) will give more details.
Usually a signature of 0 or -1 means misconnections or no clocking (but it's hard to tell which, and it could be other things as well.  A three-digit value of non-0/-1 would mean corruption of ROM/Flash areas that aren't supposed to be user-writeable.)
You CAN do analysis to get a better idea of what happened, but ... usually a board has to cost a lot more than $50 before this becomes economically worthwhile.
okay - good info to know.

i guess it will just have to be categorized as 'sacrificable for tinkering with'.

for Educational Purposes - learning by taking it apart slowly.

thanks a lot for bearing with me !

Go Up