Bricked 328P? [solved]

Hi Folks,

I'm struggling with two boards using a 328P. I have to mention that another 8 are working nicely. I can't get the bootloader on the chip of these two boards. Yes, I had some problems during bring-up and the attempts to install the bootloader. I'm pretty sure now that all connections (MISO, MOSI, SCK, Reset ) are okay, they are checked with a continuity tester. Operation voltage is fine. Trying to install the bootloader using an Uno board I get the well described:

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

Double checked it with a command line command:

avrdude -P /dev/ttyACM1 -b 19200 -c avrisp -p m328p -v -F

avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:41:10
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/axel/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyACM1
Using Programmer : avrisp
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 AVR ISP
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.06s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done. Thank you.

So everything points to not being in contact with the target 328P. Could I actually have the 328P bricked by trying to install the bootloader with an erroneous hardware (e.g. issuing a HW reset during programming)? Other ideas?

Thanks in advance.

  • Tuxuser

https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader

try that

robotteck:
Installing an Arduino Bootloader - learn.sparkfun.com

try that

Thanks for the tutorial robotteck. Very informative.

Tuxuser:
So everything points to not being in contact with the target 328P.

Signature 0x00000 is usually a wiring problem or lack of clock.

Tuxuser:
Could I actually have the 328P bricked by trying to install the bootloader with an erroneous hardware (e.g. issuing a HW reset during programming)?

Not easily.

Tuxuser:
Other ideas?

Does it have a clock crystal?

Thanks a lot for your responses!

My answers:

  • No ext crystal, programed for int 8 MHZ osc.
  • The uC type used is 328-AU
  • Correct mrburnette, can be only involuntarily miswiring (shorts, opens) because of 8 pcbs up and running

What I can see is the SCK signal, issuing a three pulse train, and RES with a single pulse with the start of bootloader programming. No comm signals on MISO & MOSI despite the tested conductivity of the connections (no shorts at these lines as well).

If you have hot air, you may consider removal of uC, board cleaning, and reattachment.

As a note, I have spent far too many frustrating hours on such hardware weirdness. However, these days, I am just not up to such foolishness, so I buy these in 5x or 10x quantities. In over 50, I have never had a single one fail ... But, if it does, I will toss it in the trash and continue on...

For me, the line between hobby and work is whether I need a Scotch after I finish the project!

Ray

mrburnette:
these days, I am just not up to such foolishness, so I buy these in 5x or 10x quantities. In over 50, I have never had a single one fail ... But, if it does, I will toss it in the trash and continue on...
5PCS Pro Mini atmega328 5V 16M Replace ATmega128 Arduino Compatible Nano | eBay

Yep. One of those and some of these to attach it to a PCB: (optional)

http://www.ebay.com/itm/331074407693

mrburnette:
For me, the line between hobby and work is whether I need a Scotch after I finish the project!

To celebrate or to drown your sorrows?

Quote from: mrburnette on Today at 10:12:40 am
For me, the line between hobby and work is whether I need a Scotch after I finish the project!

To celebrate or to drown your sorrows?

Oh, a single-malt Scotch is always to celebrate.... even in times of sorrow, it is good to know that one can celebrate the long and honorable tradition of fine Scotch making and the good-fortune to be alive and enjoy a drachm or two! :smiley:

Ray

XD Perfect advice - I'll replace the uC and have a Scotch - Cheers! Keep you posted on insobriety and reason :wink:

BTW: Reason why I did not use those small boards was mainly space savings, then cost and 3.3V level compatibility (yeah, I know there are some out with 3.3V supply available as well).

Tuxuser:
BTW: Reason why I did not use those small boards was mainly space savings, then cost and 3.3V level compatibility (yeah, I know there are some out with 3.3V supply available as well).

They ALL work at 3.3V. If you put 3.3V on Vcc, you'll have a 3.3V Arduino.

Some FTDI programmers even have a voltage selector to help you: http://hz00.i.aliimg.com/img/pb/011/921/422/422921011_343.jpg

Yes, you can't use the onboard regulator but that's no big deal. You can get them for about $0.12 http://www.ebay.com/itm/221105133435

It's about 9 in the morning, late enough for the celebration scotch? Replaced the uC and boards are working fine. Means, there are possibilities to brick the 328 if the HW is faulty.

@ fungus: you're right but don't forget to modify the fuses!

Replaced the uC and boards are working fine. Means, there are possibilities to brick the 328 if the HW is faulty.

Would you guess that a fault fried the 328 or is there a possibility the 328 was faulty on receipt? I assume they were received in cut-strips from reels, but maybe not. My electronics bench has the antistatic mat and the mat is properly grounded, but years of playing with the Atmega328P-PU has caused me to be rather careless... Maybe the -AU is a tiny lightning-rod?

Anyway, glad you are now 10 for 10!

Ray

Ray,

I recall two mistakes I made during bring up:

  1. I left my external watchdog connected, hence it surely issued a HW reset during bootloader pgm.
  2. The 3.3 V DC/DC was connected and (over) loaded the programmer's (UNO) voltage supply.

What I don't know is how the bootloader programming is actually performed and whether an incomplete programming cycle could get the 328 into a what-so-ever state. I don't think they were faulty on receipt (2 out of 12+ seems unlikely to me). Yes, they came in cut-strips and although I don't work under full esd I take some measures and furthermore never experienced any troubles that I could relate to esd.

However, I appreciate exchanging thoughts with you guys!

  • Tuxuser