Datasheet
331
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
21.2.5 Device Operations
Several commands on the Flash memory are available. These commands are summarized in Table 21-3 on page 328.
Each command is driven by the programmer through the parallel interface running several read/write handshaking
sequences.
When a new command is executed, the previous one is automatically achieved. Thus, chaining a read command after a
write automatically flushes the load buffer in the Flash.
In the following table:
DATA[15:0] pertains to SAM4SxB/C (64/100 pins)
21.2.5.1 Flash Read Command
This command is used to read the contents of the Flash memory. The read command can start at any valid address in
the memory plane and is optimized for consecutive reads. Read handshaking can be chained; an internal address buffer
is automatically increased.
21.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)
10 Waits for NVALID high Sets DATA bus in input mode X
11 Sets DATA in output mode Sets NVALID signal Input
12 Sets NCMD signal Waits for NCMD high Input
13 Waits for RDY high Sets RDY signal Input
Table 21-5. Read Handshake (Continued)
Step Programmer Action Device Action DATA I/O
Table 21-6. Read Command
Step Handshake Sequence MODE[3:0] DATA[15:0]
1 Write handshaking CMDE READ
2 Write handshaking ADDR0 Memory Address LSB
3 Write handshaking ADDR1 Memory Address
4 Read handshaking DATA *Memory Address++
5 Read handshaking DATA *Memory Address++
... ... ... ...
n Write handshaking ADDR0 Memory Address LSB
n+1 Write handshaking ADDR1 Memory Address
n+2 Read handshaking DATA *Memory Address++
n+3 Read handshaking DATA *Memory Address++
... ... ... ...