Page 1 of 1

cannot rescue two 328P-PU chips

Posted: Sun May 07, 2017 4:29 pm
by skybolt
I am trying to use this board to revive two apparently dead 328p-pu chips. Neither can be placed into programming mode by a standard ISP board, both read 3 for the built in fuse values by the HV Rescue Shield, and neither will accept a sketch (on two different Uno boards). There are slight differences in the errors for each chip.

I'm almost certain the reason both 328s are unresponsive is because I misconfigured them. Unfortunately, I don't recall the exact steps -- it was about a year ago. At the time I was trying to set the 'erase EEPROM on sketch load' fuse, by editing boards.txt with a previous installation of Arduino on a different machine. (Current platform is OS-X 10.12.4).

I'm using the HV Rescue Shield becuase I may have disabled the internal clocks on these 328s, and I came across an article that said using a HV programmer to re-enable the clock. I'm not sure if the HV Rescue Shield will do this, so far I haven't been able to establish any communications between either of the bricked chips and the HVRS -- although it works well with a known good chip.

Both bad chips read:
Select mode:
1: ATmega (28-pin)
2: ATtiny2313
3: ATtiny (8-pin) / HVSP
Selected mode: ATMEGA
Insert target AVR and press button.

Existing fuse values:
LFUSE: 3
HFUSE: 3

Enter desired LFUSE hex value (ie. 0x62):

Good chip:
Select mode:
1: ATmega (28-pin)
2: ATtiny2313
3: ATtiny (8-pin) / HVSP
Selected mode: ATMEGA
Insert target AVR and press button.

Existing fuse values:
LFUSE: FF
HFUSE: D6

Enter desired LFUSE hex value (ie. 0x62):
Here's a rundown of the behavior I'm seeing -- notice in particular that both 'bad' chips behave differently when trying to program via ISP or burn the boot loader by ISP:


Trying to directly load sketch to Uno with each chip
Chip 1 and 2 read:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
Chip 3 (known good with bootloader and verbose enabled) reads:
avrdude done. Thank you.

Test matrix 1: Trying to load sketch using Adafruit ISP shield. (would have also tested EvilMadScientist ISP shield, but I cannabalized the ZIF socket for your HV shield):

ISP mode:
Chip 1 reads:
avrdude: stk500_recv(): programmer is not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Chip 2 reads:
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.

An error occurred while uploading the sketch
Chip 3 (known good chip) reads:
avrdude: 4448 bytes of flash written
avrdude done. Thank you.

Test Matrix 2: Using adafrduit ISP board to burn bootlader:
Chip 1 reads (in part):
avrdude: stk500_recv(): programmer is not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

Error while burning bootloader.
Chip 2 reads (in part):
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.

Error while burning bootloader.
Chip 3 (known good) reads (in part)
avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done. Thank you.

Testing Matrix 3: Adafruit ISP to run board detector sketch:

Chip 1 and 2:
Atmega chip detector.
Written by Nick Gammon.
Version 1.17
Compiled on May 7 2017 at 13:47:36 with Arduino IDE 10801.
Attempting to enter ICSP programming mode ......................................................
Failed to enter programming mode. Double-check wiring!
Programming mode off.
Known good chip (also works with no bootloader)
Atmega chip detector.
Written by Nick Gammon.
Version 1.17
Compiled on May 7 2017 at 13:47:36 with Arduino IDE 10801.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0xFF
HFuse = 0xD6
EFuse = 0xFD
Lock byte = 0xCF
Clock calibration = 0x97
Bootloader in use: Yes
EEPROM preserved through erase: Yes
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00

Bootloader:

[hex dump deleted]

MD5 sum of bootloader = 0xFB 0xF4 0x9B 0x7B 0x59 0x73 0x7F 0x65 0xE8 0xD0 0xF8 0xA5 0x08 0x12 0xE7 0x9F
Bootloader name: optiboot_atmega328

First 256 bytes of program memory:

[hex dump deleted]

Programming mode off.

Re: cannot rescue two 328P-PU chips

Posted: Thu May 11, 2017 9:10 pm
by mightyohm
Are you able to reset the fuses with the rescue shield? What happens when you try to set the default values (0x62 0xDF)?

I've seen chips like your chip 2 before - once the device signature is corrupted the part is usually not recoverable.

Re: cannot rescue two 328P-PU chips

Posted: Sun May 14, 2017 5:38 pm
by skybolt
Thanks for the reply ...

When I attempt to set the values (using the sample values or the values found on a forum for a 328), the sketch indicates the values have been written, but the sketch still replies with 3 as the existing fuse values. I also tried to set them to FF. If the sketch is only able to write valid values, I suppose I should verify the correct values for each fuse.

I'm not heartbroken about losing these two chips, but I'd really like to trace down a root cause.

Re: cannot rescue two 328P-PU chips

Posted: Tue May 16, 2017 5:12 pm
by mightyohm
Did you change the MEGA variable in the sketch to '1' and recompile/reupload to your Arduino Mega?

Re: cannot rescue two 328P-PU chips

Posted: Tue May 16, 2017 6:06 pm
by skybolt
I thought I had -- but I must have only tested both values (0, 1) when using a standard Arduino Uno. I did upload the sketch with the correct setting, and now I'm able to read the fuses. Both chips read FF and DE for low and high. I set the values to 62 and D9 to see if they would successfully write, they did and I was able to read these values back after removing and re-inserting the chip.

I've now successfully managed to get my known good chip to fail to enter ICSP programming mode, like the two chips I'm trying to revive. I'll go use one of the online fuse calculators to figure out the correct values and go from there. Thanks you!! Your help and your shield have gotten me almost all the way there


Here's a dump of serial output:

------

It is now safe to remove the target AVR.

Insert target AVR and press button.

Existing fuse values:
LFUSE: 62
HFUSE: D9

Enter desired LFUSE hex value (ie. 0x62): FF
Enter desired HFUSE hex value (ie. 0xDF): DE
Burning fuses...

Read LFUSE: FF
Read HFUSE: DE
Burn complete.

Re: cannot rescue two 328P-PU chips

Posted: Wed May 17, 2017 2:39 pm
by skybolt
I spoke too soon -- those weren't the bad chips I'd been testing -- with 7 or 8 328's lying around it's easy to mix them up. I have recompiled the sketch for the Mega, but unfortunately it's still not able to read or write fuses to the two dead chips. Both respond:
Insert target AVR and press button.

Existing fuse values:
LFUSE: 3
HFUSE: 3

Enter desired LFUSE hex value (ie. 0x62): FF
Enter desired HFUSE hex value (ie. 0xDF): 39
Burning fuses...

Read LFUSE: 3
Read HFUSE: 3
Burn complete.

Re: cannot rescue two 328P-PU chips

Posted: Sat May 20, 2017 9:41 pm
by mightyohm
It seems that the chips are indeed bad. If you'd like, I can double check them on my setup - send me a PM and I can provide a return shipping address.