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

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
Preliminary Technical Data
0x3FFF
0x3E00
0x3DFF
0x3C00
0x3BFF
0x3A00
0x39FF
0x3800
0x37FF
0x3600
0x35FF
0x3400
The flash memory can be protected from read or write/erase
access. The protection is implemented in part of the last page of
the flash memory, Page 31. Four of the bytes from this page are
used to set up write/erase protection for each of the pages.
Another byte is used for configuring read protection of the flash
memory. The read protection is selected for groups of four
pages. Finally, there is a byte used to store the key required for
modifying the protection scheme. If any code protection is
required, the last page of flash memory must be write/erase
protected at a minimum. The implication of write/erase
protecting the last page is that the content of the 506 bytes in
this page that are available to the user must not change.
Thus it is recommended that if code protection is enabled, this
last page should be used for program memory only if the
firmware does not need to be updated in the field. If the
firmware must be protected and can be updated at a future date,
the last page should be used only for constants used by the
program code that will not need to be read during emulation or
debug.
Therefore, Pages 0 through 30 are for general program and data
memory use. It is recommended that Page 31 is used for
constants or code that will not need to be updated. Note that the
last 6 bytes of Page 31 are reserved for protecting the flash
memory.
0x33FF
0x3200
0x31FF
0x3000
0x2FFF
0x2E00
0x2DFF
0x2C00
0x2BFF
0x2A00
0x29FF
0x2800
0x27FF
0x2600
0x25FF
0x2400
0x23FF
0x2200
0x21FF
0x2000
PAGE 31
PAGE 30
PAGE 29
PAGE 28
PAGE 27
PAGE 26
PAGE 25
PAGE 24
PAGE 23
PAGE 22
PAGE 21
PAGE 20
PAGE 19
PAGE 18
PAGE 17
PAGE 16
Figure 66: Flash Memory Organization
READ
PROTECT
BIT 7
READ
PROTECT
BIT 5
READ
PROTECT
BIT 4
READ
PROTECT
BIT 6
CONTAINS
PROTECTION
SETTINGS
0x1FFF
0x1E00
0x1DFF
0x1C00
0x1BFF
0x1A00
0x19FF
0x1800
0x17FF
0x1600
0x15FF
0x1400
0x13FF
0x1200
0x11FF
0x1000
0x0FFF
0x0E00
0x0DFF
0x0C00
0x0BFF
0x0A00
0x09FF
0x0800
0x07FF
0x0600
0x05FF
0x0400
0x03FF
0x0200
0x01FF
0x0000
PAGE 15
PAGE 14
PAGE 13
PAGE 12
PAGE 11
PAGE 10
PAGE 9
PAGE 8
PAGE 7
PAGE 6
PAGE 5
PAGE 4
PAGE 3
PAGE 2
PAGE 1
PAGE 0
READ
PROTECT
BIT 3
READ
PROTECT
BIT 1
READ
PROTECT
BIT 0
READ
PROTECT
BIT 2
Rev. PrD | Page 97 of 140
USING THE FLASH MEMORY
The 16 kbytes of Flash memory are configured as 32 pages, each
of 512 bytes. As with the other ADE7169F16 peripherals, the
interface to this memory space is via a group of registers
mapped in the SFR space – see . A data register, EDATA, holds
the byte of data to be accessed. The byte of flash memory is
addressed via the EADRH and EADRL registers. The Flash
SFRs
Table 83. Flash SFRs
SFR
ECON
FLSHKY
PROTKY
EDATA
PROTB0
PROTB1
PROTR
EADRL
EADRH
Finally, ECON is an 8-bit control register that can be written to
with one of seven Flash memory access commands to trigger
various read, write, erase, and verify functions. Figure 67
demonstrates the steps required for access to the flash memory.
ECON—Flash/EE Memory Control SFR
Programming Flash memory is done through the Flash
memory control Flash Control SFR (ECON, 0xB9). This SFR
allows the user to read, write, erase, or verify the 16 kbytes of
Flash memory. As a method of security, a key must be written
to the FLSHKY register to initiate any user access to the flash
EADRH
FLSHKY
Figure 67: Flash Memory Read/Write/Erase Protection Block Diagram
Flash Protection Key
EADRL
Address
Address
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
0xC6
0xC7
ADDRESS
DECODER
FLSHKY=0x3B?
Command
Default
Value
0x00
0xFF
0xFF
0x00
0xFF
0xFF
0xFF
0x00
0x00
PROTECTION
DECODER
ECON
ACCESS
ALLOWED?
Bit
Addressable
No
No
No
No
No
No
No
No
No
ADE7169F16
FALSE: ACCESS DENIED
TRUE: ACCESS ALLOWED
Flash
Flash Key
Flash Data
Flash Read
Description
Control
Flash
Protection
Key
Flash W/E
Protection 0
Flash W/E
Protection 1
protection
Flash Low
address
Flash High
address
ECON=0
ECON=1

Related parts for ade7169f16