ade7169f16 Analog Devices, Inc., ade7169f16 Datasheet - Page 98

no-image

ade7169f16

Manufacturer Part Number
ade7169f16
Description
Single-phase Energy Measurement Ic With 8052 Mcu, Rtc And Lcd Driver
Manufacturer
Analog Devices, Inc.
Datasheet
ADE7169F16
memory. Upon completion of the flash memory operation, the
FLSHKY register is reset such that it must be written prior to
another flash memory operation. Requiring the key to be set
before an access to the flash memory decreases the likelihood of
user code or data being overwritten by a program that has run
amuck.
The program counter, PC, is held on the instruction where the
ECON register is written to until the flash memory controller is
Table 84. Flash Control SFR (ECON, 0xB9)
Table 85. Flash Key SFR (FLSHKY, 0xBA)
Table 86. Flash Protection Key SFR (PROTKY, 0xBB)
Table 87. Flash Data SFR (EDATA, 0xBC)
Table 88. Flash Write/Erase Protection 0 SFR (PROTB0, 0xBD)
Bit
Location
7-0
Bit
Location
7-0
Bit
Location
7-0
Bit
Location
7-0
Bit
Bit
Mnemonic
ECON
Bit
Mnemonic
FLSHKY
Bit
Mnemonic
PROTKY
Bit
Mnemonic
EDATA
Bit
0
Default
Value
0
Default
Value
0xFF
Default
Value
0xFF
Default
Value
Default
1
2
3
4
5
8
The content of this SFR is compared to the Flash key – 0x3B. If the two
values match the next ECON operation is allowed - see Protecting the
Flash.
The content of this SFR is compared to the Flash memory location at
address 0x3FFA. If the two values match, the update of the Write/Erase
and Read protection set up is allowed - see Protecting the Flash.
If the protection Key in the flash is 0xFF, PROTKY SFR value is not used for
comparison. The PROTKY SFR is also used to write the protection key in
the flash. This is done by writing the desired value in PROTKY and write
0x08 in the ECON SFR. This operation can only be done once.
Flash pointer data
Description
Description
Description
Description
Description
Rev. PrD | Page 98 of 140
Write byte: The value in EDATA is written to the Flash memory, at
the page address given by EADRH and EARDL. Note that the byte
being addressed must be pre-erased
Erase page: A 512-byte page of Flash memory address is erased.
The page is selected by the address in EADRH/L. Any address in
the page can be written to EADRH/L to select it for erasure.
Erase all: All 16kbytes of the Flash memory are erased. Note: This
command is used during serial and parallel download modes but
should not be executed by user code.
Read byte: The byte in the Flash memory, addressed by
EADRH/L, is read into EDATA.
Erase page and write byte: The page that holds the byte
addressed by EADRH/L is erased. Then, data in EDATA is written
to the byte of flash memory addressed by EADRH/L.
Protect code: See Protecting the Flash.
done performing the requested operation. Then the PC
increments to continue with the next instruction. Any
interrupts requests that occur while the flash controller is
performing an operation are not handled until the flash
operation is complete. All peripherals, such as timers and
counters, will continue to operate as configured throughout the
flash memory access.
Preliminary Technical Data

Related parts for ade7169f16