Atmel 89C51RD2 losing program

I have designed a product using the 89C51RD2 processor. Significant numbers of the product are losing the Flash program in some way, apparently on power up, they work fine for a while then fail to run on the next power up. Reprogramming the processor restores operation.

The program memory has to be locked, so I can't tell if the program is being corrupted or if the boot vector is being changed. There is no firmware update software (except the built in boot loader). Has anyone else experienced this?

--
Tim Mitchell
Reply to
Tim Mitchell
Loading thread data ...

In article , Tim Mitchell writes

To answer my own question, I have just visited the Atmel site and they have recently added a note about this device losing/corrupting flash memory on power up/down or in brownout. So I am obviously not the only one...

--
Tim Mitchell
Reply to
Tim Mitchell

Are you using an external reset chip?

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

Hi! I have just made a design with the Atmel AT89C4051 microcontroller. What kind of reset chip and schematic would you sujjest me? I am afraid if the flsh memory could become corrupted after a bad reset or when the supply voltage becomes under a certain range. Any references chips that are currently used with Atmel Micro ma interest me . @+ Regards, MB.

--

formatting link

Grzegorz Zalot a écrit :

few

Reply to
Matthieu Benoit

when the

Unlike the RD2/ED2, the 89C4051 family cannot self pgm, and needs 12V Vpp on RST - so you should be safe from corruption.

-jg

Reply to
Jim Granville

Hallo Matthieu Benoit !:

The AT89C4051 have a brown-out !

--
Grzegorz Zalot

complex ltd.
 Click to see the full signature
Reply to
Grzegorz Zalot

Hallo Tim Mitchell !:

You MUST have an external RESET with Brown-Out !!! Otherwise the Flash is sometimes erased, in 64-byte sectors. I know this problem form 8 months .....

HTH ...

--
Grzegorz Zalot

complex ltd.
 Click to see the full signature
Reply to
Grzegorz Zalot

Jim, where is this latest info? All the information I can find, and our Atmel disti, say that there is no DIP package available.

--
Tim Mitchell
Reply to
Tim Mitchell

In article , Grzegorz Zalot writes

Yes, it is a shame that Atmel have only just made this fact known after producing the device for 3 years.

--
Tim Mitchell
Reply to
Tim Mitchell

Hallo Tim Mitchell !: .....

Very quickly :-\ ...

I have problems from PIC16F648 now - sometimes the program is wrong executed. It seems, the ram-banks ase wrong restored.

And ... good luck with T89C51RD2 ......

--
Grzegorz Zalot

complex ltd.
 Click to see the full signature
Reply to
Grzegorz Zalot

It's not that uncommon - any device that has the ABILITY to self program ( ie via a SW call, and not with external Vpp's ) needs to be treated with care, to ensure erratic SW calls CANNOT occur, and brownout is a classic instance.

I would try and get samples of the AT89C51ED2, as that shows a Voltage reset (but the data does not mention the voltage threshold) - on some uC these voltage resets still leave a no-mans-land where the XTAL is too fast for the Vcc. As the AT89C51ED2 also regulates the core with the same Vref, it should (in theory :) be able to work very well in this respect.

- jg

Reply to
Jim Granville

- on their web ?

formatting link

This is the june copy, that adds DIP40, and mention of the voltage reset. Finding one may be a challenge, vendors often ramp-down the old device faster than the supply pipeline ramps up the replacement :)

Let us know how you go, the RD2 is a quite popular device, so others will be making this migration.

The on chip regulator is a nice feature : less power and better EMC but '5V drop in' compliant. The wide Vcc means you stock one device to cover both 3V &

5V designs.

- jg

Reply to
Jim Granville

in

design

I just started working with the AT89C51RD2 yesterday - the PLCC44 version that I'm using in a DIP 40 socket via an Iguana Labs adapter. I noticed a brownout section in the AT89C51RD2 documentation but it's devoid of it in the T89C51RD2. Looks like Atmel found the oops and corrected it.

The Atmel web site is never up to date regarding delivery or availability. At least I've never found it to be, but yes, my distributor said the same thing. We have about 800 of the T89C51RD2s fortunately. ;-) Too bad one cannot get the AT89C51RD2 in DIP 40 form!

-->Neil

Reply to
Neil Bradley

Right... I was slightly put off by the fact that the main page for the device (and the device parametric table, and in fact the whole of their website) does not mention the dip40 package. Having to download a 2MB PDF file to find out is a bit of a bummer.

Anyway some samples are now supposedly winging their way to me so we'll see if it works OK.

--
Tim Mitchell
Reply to
Tim Mitchell

Why don't you use the SMD device together with the required reset chip on an adaptor board ? The 44pin quad flat pack easlity fits on a PCB the size of of DIP40.

Regards Anton Erasmus

Reply to
Anton Erasmus

The standard reset circuit is just a capacitor to Vcc and perhaps a resistor to pull down. Shouldn't be too hard to bodge an MCP101 reset chip (TO92) in there somewhere, perhaps with a blob of epoxy to stop it dropping off.

Paul Burke

Reply to
Paul Burke

In article , Grzegorz Zalot writes

But accord An internal diffused resistor to Vss permits a power-on reset using only an external capacitor to Vcc.

If you can't rely on the manufacturer's data sheet, where do you get valid information from??

--
Tim Mitchell
Reply to
Tim Mitchell

Hallo Tim Mitchell !: ..........

Theoretically ..... but practically no.

From the colleagues, which know this provesor a litte better .....

This is not a normal situation, but a small RESET-circiut is better then lost of program ....

--
Grzegorz Zalot

complex ltd.
 Click to see the full signature
Reply to
Grzegorz Zalot

They may say so, and as far as generating a reset pulse on power-off, that circuit does the job nicely, no problem.

The *real* problem with this approach is not power-on reset, though: it's brown-outs, or bad power sources that ramp up slower than your RC circuit charges up --- generally anything that can send your micro into a situation plainly forbidden by its data sheets.

The crucial issue was already named in another posting: a device that can potentially rewrite its own (supposedly) non-volatile program memory is in serious danger of doing that accidentally in such illegal operating conditions.

And then there's Murphy's law, which says because this _can_ possibly go wrong, this is exactly what _will_ happen, sooner than you'ld like to. Usually only at your customer's site, and only after you've delivered enough of the units that replacing them will be somewhere between a major hassle and a strict non-option.

So: replace your RC circuit by a proper CPU monitor IC, and you'll have one issue less to lose sleep about. Only go without one if your micro already has internal Vcc watchdog circuitry (but make you you can trust that --- test it!).

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

The point I was making is that it ought to be easy to bodge on an active level detecting reset chip. The result might look a little ugly, but handmaid is as handmaid does, and I'm sure we've all seen a lot worse.

Paul Burke

Reply to
Paul Burke

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.