XC2200 Derivatives
System Units (Vol. 1 of 2)
Memory Organization
User’s Manual
3-25
V2.1, 2008-08
MemoryX2K, V1.3
3.9.4
Details of Command Sequences
The description defines the command sequence with pseudo assembler code. It is
“pseudo” because all addresses are direct addresses which is generally not possible in
real assembler code.
The commands are called by a sequence of one to six data moves into the flash memory
range. The data moves must be of the “word” type, i.e. not byte move instructions. The
following sections describe each command. The following abbreviations for addresses
and data will be used:
•
PA: “Page Address”. This is the base address of the destination page. For example
the very first page has the address C0’0000
H
. The page 13 of the second array has
the PA = C0’0000
H
+ 1·256·1024 (for the array) + 0·4·1024 (for the sector) + 13·128
(for the page) = C4’0680
H
.
•
SECPA: “Security Page Address”. This is the virtual address of a security page. It is
“virtual” because SECPA is just used as argument of the command sequence to
identify the security page but the physical storage of the security page is hidden.
Two security pages are defined:
SecP0: address C0’0000
H
.
SecP1: address C0’0080
H
.
•
WD: “Write Data”. This is a 16-bit data word that is written into the assembly buffer.
•
SA: “Sector Address”. This is the physical sector number as defined in
based on the address of the flash module. Two examples as clarification:
1. Physical sector number 16 of the first array that is based on C0’0000
H
is addressed
with SA = C0’0000
H
+ 16·4·1024 = C1’0000
H
.
2. The second 256 KB array has the base address C4’0000
H
(as shown in
). So its physical sector number 3 has the SA = C4’0000
H
+ 3·4·1024 =
C4’3000
H
.
•
PWD: “Password”. This is a 64-bit password. It is transferred in 4 16-bit data words
PWD0 = PWD[15:0], PWD1 = PWD[31:16], PWD2 = PWD[47:32] and PWD3 =
PWD[63:48].
•
Address XX followed by two hexadecimal digits, for example “XXAA
H
”. If the
command targets a certain flash module the XX must be translated to its base
address. So “XXAA
H
” means C0’00AA
H
for all commands addressing flash 0,
C4’00AA
H
for flash 1 and C8’00AA
H
for flash 2. If a command (e.g. “Clear Status”)
addresses the complete flash memory the base address of flash module 0 must be
used.
•
Data XX followed by two hexadecimal digits, e.g. XXA5
H
. This is a “don’t care” data
word where only the low byte must match a certain pattern. So in this example all data
words like 12A5
H
or 79A5
H
can be used.
•
MR: “Margin”. This 8-bit number defines the read margin. MR can take the values 00
H
(normal read), 01
H
(hard read 0), 02
H
(alternate hard read 0), 05
H
(hard read 1), 06
H
(alternate hard read 1). All other values of MR are reserved.