333
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
19.4.3.1
Getting Embedded Flash Descriptor
This command allows the system to learn about the Flash organization. The system can take full
advantage of this information. For instance, a device could be replaced by one with more Flash
capacity, and so the software is able to adapt itself to the new configuration.
To get the embedded Flash descriptor, the application writes the GETD command in the
EEFC_FCR register. The first word of the descriptor can be read by the software application in
the EEFC_FRR register as soon as the FRDY flag in the EEFC_FSR register rises. The next
reads of the EEFC_FRR register provide the following word of the descriptor. If extra read oper-
ations to the EEFC_FRR register are done after the last word of the descriptor has been
returned, then the EEFC_FRR register value is 0 until the next valid command.
19.4.3.2
Write Commands
Several commands can be used to program the Flash.
Flash technology requires that an erase be done before programming. The full memory plane
can be erased at the same time, or several pages can be erased at the same time (refer to
ure 19-7, "Example of Partial Page Programming"
, and the paragraph below the figure.). Also, a
page erase can be automatically done before a page write using EWP or EWPL commands.
After programming, the page (the whole lock region) can be locked to prevent miscellaneous
write or erase sequences. The lock bit can be automatically set after page programming using
WPL or EWPL commands.
Data to be written are stored in an internal latch buffer. The size of the latch buffer corresponds
to the page size. The latch buffer wraps around within the internal memory area address space
and is repeated as many times as the number of pages within this address space.
Note:
Writing of 8-bit and 16-bit data is not allowed and may lead to unpredictable data corruption.
Write operations are performed in a number of wait states equal to the number of wait states for
read operations.
Table 19-3.
Flash Descriptor Definition
Symbol
Word Index
Description
FL_ID
0
Flash Interface Description
FL_SIZE
1
Flash size in bytes
FL_PAGE_SIZE
2
Page size in bytes
FL_NB_PLANE
3
Number of planes.
FL_PLANE[0]
4
Number of bytes in the first plane.
...
FL_PLANE[FL_NB_PLANE-1]
4 + FL_NB_PLANE - 1
Number of bytes in the last plane.
FL_NB_LOCK
4 + FL_NB_PLANE
Number of lock bits. A bit is associated
with a lock region. A lock bit is used to
prevent write or erase operations in the
lock region.
FL_LOCK[0]
4 + FL_NB 1
Number of bytes in the first lock region.
...
Summary of Contents for SAM4S Series
Page 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Page 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...