Not sure if any of this will solve it but a few things to try (in no
particular order)
1. Copy the code from the running micro into the units that don't run. to
prove that the h/w of the two units is ACTUALLY ok.
2. Double (triple) check the Fuse bits on the working and non working
units - especially OCDEN , the brownout detect bits and the clock fuses
(sorry if I am telling you the obvious)
3. It really sounds like a h./w problem. Are all three boards built at the
same time by the same people? (ie. are you SURE they are really identical?)
4. Do you have watchdog fuse enabled? Any External Reset sources? The JTAG
will 'disconnect' if the device is reset and it will look like it has lost
sync with AVRStudio. I had a dodgy PSU that would glitch when switching a
load and the micro would reset - lots of fun as the JTAG got 'lost'.
5. Are you using your JTAG and/or ISP pins for other things (ie. is it
possible for them to be loaded down when in program mode - remember in the
mega128 the ISP program pins are shared with a UART)
6. Check your BOD bits - I seem to remember that even though the micro VCC
is <5v the BOD level 4.7v and 2.7v are fixed values (ie. regardless of VCC)
7. What Baudrate do you run to the JTAG ICE? I normally run at 115K but you
might try different values to see if that helps (better to run slow than not
at all)
8. What if your 'JTag Port Frequency' - remember that this must be 1/4 of
the xtal freq (I have had LOTS of weird things happening when this was not
right) - Consider the possibility of JTAG Port Freq that is set top
2MHz -which is fine if xtal is 8MHz. However a 'virgin micro has (by
default) the 1MHz internal osc enabled. (Something to think about?)
Unfortunately these JTAG settings are only adjustable when one is connected
to a micro! This can lead to an obvious Catch-22 situation where one can't
connect to a micro when internal OSC enabled because of JTAG clock freq is
too high but one can't get into the appropriate AVRStudio option to change
it!!! ARGHH Where's the Sledge hammer ;-)
9. Do you have an STK500 around? Can you double check your tools with it?
10. You mention 3V VCC - You _are_ using the Mega128-L part aren't you?
(sorry)
11. Do you have any s/w running in the background that may affect timing.
Can you see a pattern as to when it all fails (eg. in the afternoon might
mean the PC might be overheating etc) - I know that this one is a long shot
(sorry).
HTH.
Please let us know how you get on.
Kind Regards,
Ivan
----- Original Message -----
From: "Dave VanHorn" <dvanhorn@dvanhorn.org>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, March 15, 2005 7:20 AM
Subject: [AVR-Chat] Oh, I am so tired of this..
>
>
> It's delivery day, and once again, my AVR tools have all decided to go
nuts.
> Anyone have any ideas for preventing this garbage?
>
> I have two AVRISPs, an STK-500, an Atmel Jtag ice, and two Olimex Jtag
Ices.
>
> I have three M128 target systems in hand. Supposed to be identical.
>
> One is running, the other two not. The two that don't run are fresh
> builds, after getting to my goal with the first one.
> I don't dare touch the one that's running until I can trust my tools
again.
>
> I've checked everything as best I can on the new systems, The chips are
> the same date code, same 8.00 MHz crystals, same (proper value) caps, VCC
> is in tolerance (3.0V), /Reset is pulled up with 1k. The oscillator is
> running a rail-to-rail sinewave of the right frequency, which at least
> confirms that the CKOPT fuse has been set.
>
> All the programmers say that they can program and verify the chip
> successfully, and that all the fuses are set right. (including M103 fuse,
> CKOPT, WD, and BOD fuses) Sometimes they fail to verify, or read wierd
> fuse values, but they are all in agreement at the moment that everything's
> fine.
>
> All three Jtag ices agree that they can load the program, but cannot read
> the SRAM, registers, or anything else, and cannot run, or even
single-step.
>
> The programmed targets do not run, and apparently do not even run a
little.
> The init code isn't even setting up the I/O ports, which is about the
first
> thing that I do after qualifying the reset, and setting up the stack.
>
> I've rebooted everything multiple times, no help
>
> It happens on at least four different computers, running XP Pro, and '98,
> and with old and new studio, though USB serial ports and "legacy COM1"
> (note, these are high end industrial USB serial boxen, not the $20 junk)
> These are real machines with other software installed, that I actually
use.
>
> Basically, anything studio drives will pack it up at random times, for
some
> random duration.
>
>
> I've had this happen any number of times, and it always "goes away" after
a
> while, but I REALLY CAN"T AFFORD THIS SHIT ANYMORE. (anyone sensing a high
> level of frustration here?)
>
> At this point, I feel like taking all my AVR tools out into the parking
> lot, making a pile of them, and pounding them into sand with a splitting
maul.
>
> I love the chips, but I really despise the tools.
>
>
>
>
>
>
> Yahoo! Groups Links
>
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AVR-Chat/
>
> <*> To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
>
> <*> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
>
MSGTAG has notified the sender that you have read this message.