English
Language : 

SAM7X256_14 Datasheet, PDF (118/662 Pages) ATMEL Corporation – ARM-based Flash MCU
20.2.5.2 Flash Write Command
This command is used to write the Flash contents.
The Flash memory plane is organized into several pages. Data to be written are stored in a load buffer that corresponds
to a Flash memory page. The load buffer is automatically flushed to the Flash:
 before access to any page other than the current one
 when a new command is validated (MODE = CMDE)
The Write Page command (WP) is optimized for consecutive writes. Write handshaking can be chained; an internal
address buffer is automatically increased.
Table 20-8. Write Command
Step Handshake Sequence
1
Write handshaking
2
Write handshaking
3
Write handshaking
4
Write handshaking
5
Write handshaking
...
...
n
Write handshaking
n+1
Write handshaking
n+2
Write handshaking
n+3
Write handshaking
...
...
MODE[3:0]
CMDE
ADDR0
ADDR1
DATA
DATA
...
ADDR0
ADDR1
DATA
DATA
...
DATA[15:0]
WP or WPL or EWP or EWPL
Memory Address LSB
Memory Address
*Memory Address++
*Memory Address++
...
Memory Address LSB
Memory Address
*Memory Address++
*Memory Address++
...
The Flash command Write Page and Lock (WPL) is equivalent to the Flash Write Command. However, the lock bit is
automatically set at the end of the Flash write operation. As a lock region is composed of several pages, the programmer
writes to the first pages of the lock region using Flash write commands and writes to the last page of the lock region using
a Flash write and lock command.
The Flash command Erase Page and Write (EWP) is equivalent to the Flash Write Command. However, before
programming the load buffer, the page is erased.
The Flash command Erase Page and Write the Lock (EWPL) combines EWP and WPL commands.
20.2.5.3 Flash Full Erase Command
This command is used to erase the Flash memory planes.
All lock regions must be unlocked before the Full Erase command by using the CLB command. Otherwise, the erase
command is aborted and no page is erased.
Table 20-9. Full Erase Command
Step Handshake Sequence
1
Write handshaking
2
Write handshaking
MODE[3:0]
CMDE
DATA
DATA[15:0]
EA
0
20.2.5.4 Flash Lock Commands
Lock bits can be set using WPL or EWPL commands. They can also be set by using the Set Lock command (SLB). With
this command, several lock bits can be activated. A Bit Mask is provided as argument to the command. When bit 0 of the
bit mask is set, then the first lock bit is activated.
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
118