
24
8266D-MCU Wireless-06/12
ATmega128RFA1
8.3.2 Preventing EEPROM Corruption
During periods of low DEVDD, the EEPROM data can be corrupted because the supply
voltage is too low for the CPU and the EEPROM to operate properly. These issues are
the same as for board level systems using EEPROM, and the same design solutions
should be applied.
An EEPROM data corruption can be caused by two situations when the voltage is too
low. First, a regular write sequence to the EEPROM requires a minimum voltage to
operate correctly. Secondly, the CPU itself can execute instructions incorrectly, if the
supply voltage is too low.
EEPROM
data
corruption
can
easily be
avoided
by following
this
design
recommendation:
Keep the AVR RESET active (low) during periods of insufficient power supply voltage.
This can be done by enabling the internal Brown-out Detector (BOD). If the detection
level of the internal BOD does not match the needed detection level, an external low
DEVDD reset protection circuit can be used. If a reset occurs while a write operation is
in progress, the write operation will be completed provided that the power supply
voltage is sufficient.
8.4 EEPROM Register Description
8.4.1 EEARH – EEPROM Address Register High Byte
Bit
7
6
5
4
3
2
1
0
$22 ($42)
Res3
Res2
Res1
Res0
EEAR11
EEAR10
EEAR9
EEAR8
EEARH
Read/Write
R
RW
Initial Value
0
X
The EEPROM Address Registers EEARH and EEARL specify the EEPROM address in
the 4K bytes EEPROM space. The EEPROM data bytes are addressed linearly
between 0 and 4096. The initial value of EEAR is undefined. A proper value must be
written before the EEPROM may be accessed.
Bit 7:4 – Res3:0 - Reserved
Bit 3:0 – EEAR11:8 - EEPROM Address
8.4.2 EEARL – EEPROM Address Register Low Byte
Bit
7
6
5
4
3
2
1
0
$21 ($41)
EEAR7
EEAR6
EEAR5
EEAR4
EEAR3
EEAR2
EEAR1
EEAR0
EEARL
Read/Write
RW
Initial Value
X
The EEPROM Address Registers EEARH and EEARL specify the EEPROM address in
the 4K bytes EEPROM space. The EEPROM data bytes are addressed linearly
between 0 and 4096. The initial value of EEAR is undefined. A proper value must be
written before the EEPROM may be accessed.
Bit 7:0 – EEAR7:0 - EEPROM Address