AVR AtMega8 SRAM content after reset or power down

S

SioL

Jan 1, 1970
0
Hi there!

Searched the net without success on this one:
Does SRAM content stay the same after reset
or various levels of power down on the
AtMega8 AVRs. Not concerned about registers,
just the SRAM area.

There used to be a blurb on this topic on AVRfreaks,
I vaguely remember some kind of errata warning about
SRAM getting corrupted. Of course right now I can't get
to the site (seems to be down).

Hope someone has some hands-on experience on this one.
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi there!

Searched the net without success on this one:
Does SRAM content stay the same after reset
or various levels of power down on the
AtMega8 AVRs. Not concerned about registers,
just the SRAM area.

There used to be a blurb on this topic on AVRfreaks,
I vaguely remember some kind of errata warning about
SRAM getting corrupted. Of course right now I can't get
to the site (seems to be down).

Hope someone has some hands-on experience on this one.

Dunno, but (in general) you probably need an external brownout circuit
to protect the SRAM from errant CPU activity during periods when the
power supply voltage is not sufficient to guarantee proper operation.


Best regards,
Spehro Pefhany
 
S

SioL

Jan 1, 1970
0
Spehro Pefhany said:
Dunno, but (in general) you probably need an external brownout circuit
to protect the SRAM from errant CPU activity during periods when the
power supply voltage is not sufficient to guarantee proper operation.

Sure, I have taken care of that, it will go into sleep or power down mode
via interrupt when the battery backup kicks in, to preserve power.
I'm just not sure whether I can trust the SRAM to stay the way it
was before going into sleep.

Generally some AVR's work with this and some don't. 8515 doesn't,
for example.
 
J

Jeroen

Jan 1, 1970
0
SioL said:
Sure, I have taken care of that, it will go into sleep or power down mode
via interrupt when the battery backup kicks in, to preserve power.
I'm just not sure whether I can trust the SRAM to stay the way it
was before going into sleep.

Generally some AVR's work with this and some don't. 8515 doesn't,
for example.

Most newer AVRs contain a brownout detector, so this should protect the
SRAM. The SRAM is not really reset like the registers. But there is a
certain minimum voltage for the SRAM to retain its contents. If the power
supply goes below this, the contents can't be trusted anymore.

If you're just putting the AVR into sleep frequently to conserve power, it
will retain the SRAM, otherwise sleep modes would be quite useless. I think
SRAM contents are retained between resets (no brownouts).

Jeroen
 
S

SioL

Jan 1, 1970
0
Jeroen said:
Most newer AVRs contain a brownout detector, so this should protect the
SRAM. The SRAM is not really reset like the registers. But there is a
certain minimum voltage for the SRAM to retain its contents. If the power
supply goes below this, the contents can't be trusted anymore.

If you're just putting the AVR into sleep frequently to conserve power, it
will retain the SRAM, otherwise sleep modes would be quite useless. I think
SRAM contents are retained between resets (no brownouts).
Jeroen

Sounds good. However, I remember reading some kind of "errata" at avrfreaks.net
for the Mega8, addressing sleep modes and memory/register retention.
Unfortunately they're down right now so I can't confirm it :(

Not all AVR's are created equal.
 
T

Tim Mitchell

Jan 1, 1970
0
SioL said:
Sounds good. However, I remember reading some kind of "errata" at avrfreaks.net
for the Mega8, addressing sleep modes and memory/register retention.
Unfortunately they're down right now so I can't confirm it :(

Not all AVR's are created equal.
On the mega8's I have used, the SRAM is preserved during reset and
sleep, but is undefined on power up or after vcc drops below the minimum
rated voltage.
 
S

SioL

Jan 1, 1970
0
Tim Mitchell said:
On the mega8's I have used, the SRAM is preserved during reset and sleep, but is undefined on power up or after vcc drops below
the minimum rated voltage.

Now that's what I was looking for. Thanks!
 
Top