Watchdog oscillator is wrong/faulty?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's a weird problem.

 

I noticed one device that was resetting spuriously, and I traced it to the watchdog.  The odd part is that it's timing out far too fast compared to the settings.  I tested it:

 

WDT Setting Actual Time measured
2s 375ms
4s 750ms
8s 1500ms

 

Test code:

 

wdt_enable(WDTO_2S);
wdt_reset(); PINONC(0); while(1);

 

I measured the pin with a scope to measure how long a reset took, and recorded the values above.  This is an ATMEGA328.  It's consistently timing out at 3/16 of what I tell it to.

 

This is a very strange problem.  I've only noticed it on one chip, so the only reason I can come up with is a faulty 128k oscillator, or some stuck bits internally in its counter or comparator.  Is there any other explanation?  Does this really happen?  Seems unbelievable but I can't think of anything else.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WDTO_2S

Tell what that is defined as.  [If carried over from another AVR model, then the values might be different.]

 

How many other devices operate as expected?  Just for fun, did you run you test on a "good" unit?

 

And you are absolutely sure that you are running the same firmware on the "good" and "bad" units, including fuse settings?

 

Certainly it is possible to have a faulty chip, especially if it might have been exposed to some type of ugly event.  Not typical, in my AVR8 experience over many scores of designs and many tens of thousands of AVRs of your family, but possible.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply.  This was a singular reject from a production run, and I really wanted to understand what was going on, since it manifests in a subtle way.  Though I should re-check some of the other rejects for something similar.  Fuses and code were all identical.

 

WDTO_2S is 7

 

I'm not sure what could possibly lead to this problem, other than a faulty chip.  I don't think any fuse setting could have an effect, and the measured WDT trigger intervals are pretty specific and consistent, but don't correspond to possible values that can be programmed.