Data Sheet
ADuC7019/20/21/22/24/25/26/27/28/29
Table 35. FEECON Register
Table 37. FEEDAT Register
Name
Address
Default Value
Access
Name
Address
Default Value
Access
FEECON
0xFFFFF808
0x07
R/W
FEEDAT
0xFFFFF80C
0xXXXX1
R/W
1 X = 0, 1, 2, or 3.
FEECON is an 8-bit command register. The commands are
described in Table 36.
FEEDAT is a 16-bit data register.
Table 36. Command Codes in FEECON
Table 38. FEEADR Register
Code Command
0x001 Null
0x011 Single read
Description
Name
Address
Default Value
Access
Idle state.
FEEADR
0xFFFFF810
0x0000
R/W
Load FEEDAT with the 16-bit data.
Indexed by FEEADR.
FEEADR is another 16-bit address register.
0x021 Single write
0x031 Erase/write
Write FEEDAT at the address pointed to
by FEEADR. This operation takes 50 µs.
Erase the page indexed by FEEADR and
write FEEDAT at the location pointed by
FEEADR. This operation takes approxi-
mately 24 ms.
Table 39. FEESIGN Register
Name
Address
Default Value
Access
FEESIGN
0xFFFFF818
0xFFFFFF
R
FEESIGN is a 24-bit code signature.
0x041 Single verify Compare the contents of the location
pointed by FEEADR to the data in
Table 40. FEEPRO Register
Name
Address
Default Value
Access
FEEDAT. The result of the comparison is
returned in FEESTA, Bit 1.
FEEPRO
0xFFFFF81C
0x00000000
R/W
0x051 Single erase
0x061 Mass erase
Erase the page indexed by FEEADR.
FEEPRO MMR provides protection following a subsequent
reset of the MMR. It requires a software key (see Table 42).
Erase 62 kB of user space. The 2 kB of
kernel are protected. This operation
takes 2.48 sec. To prevent accidental
execution, a command sequence is
required to execute this instruction.
See the Command Sequence for
Executing a Mass Erase section.
Reserved.
Reserved.
Reserved.
Reserved.
Table 41. FEEHIDE Register
Name
Address
Default Value
Access
FEEHIDE
0xFFFFF820
0xFFFFFFFF
R/W
FEEHIDE MMR provides immediate protection. It does not
require any software key. Note that the protection settings in
FEEHIDE are cleared by a reset (see Table 42).
0x07
0x08
0x09
Reserved
Reserved
Reserved
Table 42. FEEPRO and FEEHIDE MMR Bit Designations
0x0A Reserved
0x0B Signature
Bit
Description
Give a signature of the 64 kB of Flash/EE
in the 24-bit FEESIGN MMR. This
operation takes 32,778 clock cycles.
31
Read protection. Cleared by user to protect all code.
Set by user to allow reading the code.
0x0C Protect
This command can run only once. The
value of FEEPRO is saved and removed
only with a mass erase (0x06) of the key.
30:0
Write protection for Page 123 to Page 120, Page 119
to Page 116, and Page 0 to Page 3. Cleared by user to
protect the pages from writing. Set by user to allow
writing the pages.
0x0D Reserved
Reserved.
0x0E
0x0F
Reserved
Ping
Reserved.
No operation; interrupt generated.
Command Sequence for Executing a Mass Erase
FEEDAT=0x3CFF;
FEEADR = 0xFFC3;
FEEMOD= FEEMOD|0x8;
1 The FEECON register always reads 0x07 immediately after execution of any
of these commands.
//Erase key enable
FEECON=0x06;
//Mass erase command
Rev. F | Page 53 of 104