Pages: [1] 2   Go Down
Author Topic: ATmega328P - reset not working  (Read 3659 times)
0 Members and 1 Guest are viewing this topic.
Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a new ATmega328P that won't respond to pulling the RESET pin low.  Other new MCU's installed in the same board (an Uno clone with clamping diode on the reset line) work fine, but this particular chip will not reset.

Tried:
 1.  Resetting from Arduino IDE (DTR signal)
 2.  Pressing the reset button on the board
 3.  Using a wire to manually short the MCU reset pin to GND plane.
 4.  Re-flashing the bootloader multiple times (avrisp)
 5.  Installing the bad chip into other known-to-be-good boards.

AVRDUDE reports the fuse settings as (all seem OK to me):
 lfuse 0xff
 hfuse 0xde
 efuse 0x05

Apparently the Uno bootloader is being successfully loaded because I get the expected 3 short LED flashes on powering up the board.  But nothing I've tried will allow the board to be reset once it is powered up

I hate to throw the chip away, but there seems to be something wrong with it.  Any suggestions beyond the things I've already tried?

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
4.  Re-flashing the bootloader multiple times (avrisp)

Does that seem to work?
Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, it does.  Which seems odd since a reset is required for this to happen, right?

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Yes.

When you wrote...

Quote
I have a new ATmega328P that won't respond to pulling the RESET pin low.

...what did you mean?  What are the symptoms?  What leads you to believe reset is not working?
Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Two things tell me that reset is not working:

1) Can't upload sketches
2) When the reset switch is closed (pressed), the bootloader does not flash the LED.

The bootloader does flash the LED upon power up, though, so I know that both the LED and bootloader are ok.

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are you using the ArduinoIDE to install the bootloader?
Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are you using the ArduinoIDE to install the bootloader?
Yes, using avrisp.

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6652
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Which seems odd since a reset is required for this to happen
Indeed.  You wouldn't be able to read the fuses with AVRDude if RESET wasn't working, either.  RESET is fundamental to talking to the chip with a programmer...

Quote
The bootloader does flash the LED upon power up, though
This is odd too.  Assuming that you're using Optiboot, the bootloader should not run, and it should NOT flash the LED, on powerup.  This is the "Adaboot fast start mod" that starts the sketch immediately on powerup, and only attempts uploading based on an "external reset."

Any chance that this somehow contains the wrong bootloader?
Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The bootloader does flash the LED upon power up, though
This is odd too.  Assuming that you're using Optiboot, the bootloader should not run, and it should NOT flash the LED, on powerup.  This is the "Adaboot fast start mod" that starts the sketch immediately on powerup, and only attempts uploading based on an "external reset."

Any chance that this somehow contains the wrong bootloader?

There is always a chance I have the wrong bootloader.  I am using unadulterated IDE 1.0, choosing Uno as board and Arduino as ISP as programmer, then Tools/Burn Bootloader.  Have followed same procedure with dozens of chips/boards, so I hope there isn't a problem ;-)

Here's the behavior I am seeing with multiple "good" chips:
 - 3 LED flashes on connection of USB cable
 - 3 LED flashes on DTR during IDE sketch upload via USB
 - 3 LED flashes on pressing reset button
 - 3 LED flashes on connection of 9VDC to power jack (no USB connection)

With the one "bad" chip, I am seeing this:
 - 3 LED flashes on connection of USB cable
 - no LED flashes on DTR during IDE sketch upload via USB, followed by upload failure message
 - no LED flashes on pressing reset button
 - 3 LED flashes on connection of 9VDC to power jack (no USB connection)

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Is it possible the RESET pin is not making good contact with the socket?
Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried chip in two boards, and also tried a jumper wire touched directly to pin. No evidence of reset.  Weird, isn't it?

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Must be a bad chip.  I put it on a breadboard and found that the problem is not that the chip doesn't reset -- it actually does respond to pulling RESET low.  The problem is that it does not restart after a reset.

To eliminate the bootloader as a variable, I burned the Blink sketch into the chip using my programmer (i.e. no bootloader).

Initiating a restart by either 1) toggling the benchtop PSU, or 2) pulling/inserting the banana plug from the PSU to the breadboard allows the Blink sketch to restart.

But if I press the Omron tactile switch (RESET to GND) on the breadboard, then Blink stops and does not restart.  Likewise, if I pull and reinsert the VCC or GND jumper wire in the breadboard rails then Blink stops and does not restart. (There is a 10K pullup on RESET).

The chip must be overly sensitive to noise on VCC, GND, or RESET.  I have a 47uF across the breadboard rails, and 0.1uF's between VCC and GND, between AVCC and AGND, and between AREF and GND.  I also have a signal diode between VCC and RESET to clamp high voltage spikes.

A different chip mounted to the same breadboard config works as expected, i.e., no problems.

Gonna toss the chip.

Jim


Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


On this solemn day we mourn the passing of a processor that never saw its full potential.  Struck down before it even had a chance to run Blink-Without-Delay.  We hope you find solace in Silicon Heaven.

 smiley-cry
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem is that it does not restart after a reset.

I have (ab)used hundreds and likely a thousdand mcus and I have yet to find one that died all by itself.

Logged

Kentucky, US
Offline Offline
Full Member
***
Karma: 1
Posts: 193
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

On this solemn day we mourn the passing of a processor that never saw its full potential.  Struck down before it even had a chance to run Blink-Without-Delay.  We hope you find solace in Silicon Heaven.

It did run Fade before its demise ;-)

Jim
Logged

TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

Pages: [1] 2   Go Up
Jump to: