Watchdog oscillator tolerances on ATmega1280?

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

Hi,

During production of a product based on ATmega1280 we had a few units (35 pcs out of 200 pcs) that failed testing. After some analysis it was found that the watchdog had restarted the unit during test. It seems like the watchdog oscillator is considerable faster in these 35 pcs.

- What are the tolerances I could expect from the watchdog oscillator?

Alternative theory: The moment the watchdog restarts the unit a lot of relays are being switched.

- Could it be a voltage spike that causes the watchdog to trigger?

Any input welcome!
Björn

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

- See a WD frequency graph in datasheet.
- Not likely. A spike would rather cause a BOR reset and/or break a normal program flow.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

Dear MBedder,

Thank you for your reply. I've looked at the graphs in the datasheet but cannot find any information of the production tolerances that the AVR has when shipping from Atmel. How large deviation from the graph can it be?

Kind regards
Björn

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

As you can see on the graphs, the average Mega1280 WD frequency may vary from 126 to 118 kHz with temperature (-40..+85 C resp.) and from 125 to 122 kHz with VDD (2.2 to 5.5V resp.). This can be roughly estimated as +-6% max across a whole allowed temperature/voltage range

While the Fwdt initial accuracy is not listed in the DS, it can be extrapolated from the internal RC oscillator calibration accuracy which is listed as +-10%. Since the WDT frequency doesn't get calibrated in a manufacturing process, I'd multiply this figure by at least 2 which leads to a 20% estimate. Along with above calculated tolerances this gives roughly +-25% tolerance which should be taken in a optimistic design consideration.

To get the exact figures you should either contact Atmel or run your own statistically correct bench tests on a decent number of Mega1280 chips.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

I have seen 20% plus on my mega48's...64mS out to nearly 80mS @3V3
Sort of confirms MBedder's comments.

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

If I were in Bjorn's situation and was puzzled, then I'd make a little test program using the watchdog interrupt function and toggle an output in the watchdog interrupt, to get a timing on the "good" and "bad" boards to see how the actual watchdog timeout values correspond to the nominal values. And then go from there...

Lee

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

I'd rather have increased the WDT period tenfold and have forgotten about all marginal tolerances to the end of times :D

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

Quote:
Alternative theory: The moment the watchdog restarts the unit a lot of relays are being switched.

Once you are done testing the WatchDog's period, then have a close look at the micro's power supply when the relays are being activated.

Does the V+ dip low if one or more relays are activated?

Is there a diode across each relay's coil, to clamp the reverse voltage spile present when the relay(s) turns off?

Do the micros have By-Pass caps across each V+/Gnd and AVcc/Gnd power pair?

Most importantly: Is the failure mode reproducible on those 35 units? Can you make it fail every time you want it to fail? If so, the error is a lot easier to track down.

JC

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

Quote:

I'd rather have increased the WDT period tenfold and have forgotten about all marginal tolerances to the end of times

There are apps where I want the WDT to be fairly predictable and fairly short.

But anyway, I hate puzzling situations so I'd at least do some profiling to verify that e.g. it >>is<< the variation in the WDT that is causing the situation.

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

DocJC wrote:
Does the V+ dip low if one or more relays are activated?

Is there a diode across each relay's coil, to clamp the reverse voltage spile present when the relay(s) turns off?

Do the micros have By-Pass caps across each V+/Gnd and AVcc/Gnd power pair?

Most importantly: Is the failure mode reproducible on those 35 units? Can you make it fail every time you want it to fail? If so, the error is a lot easier to track down.

JC


Yes, I have diodes across each coil and caps on V+ and AVcc. The relays are running on +12V and the AVR on +5V with a 7805 in between.

Done some simple measurements and the 7805 and caps seems to filter out any noise from the +12V side.

According to production the error are stable on all 35 pcs but haven’t been able to verify it myself yet. On the first erroneous unit they sent me the watchdog always kicked in on the same line of code.

Getting more units today, it will be interesting to see if the watchdog has the same timing on all pcs.

Thanks for all shared wisdom
/Bjorn