English
Language : 

SAM4L Datasheet, PDF (275/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/L2
14.10.2 Flash Command Register
Name:
FCMD
Access Type:
Read/Write
Offset:
0x04
Reset Value:
0x00000000
The FCMD can not be written if the flash is in the process of performing a flash command. Doing
so will cause the FCR write to be ignored, and the PROGE bit in FSR to be set.
31
30
29
28
27
26
25
24
KEY
23
22
21
20
19
18
17
16
PAGEN [15:8]
15
14
13
12
11
10
9
8
PAGEN [7:0]
7
6
5
4
3
2
1
0
-
-
CMD
• KEY: Write protection key
This field should be written with the value 0xA5 to enable the command defined by the bits of the register. If the field is written
with a different value, the write is not performed and no action is started.
This field always reads as 0.
• PAGEN: Page number
The PAGEN field is used to address a page or fuse bit for certain operations. In order to simplify programming, the PAGEN field
is automatically updated every time the page buffer is written to. For every page buffer write, the PAGEN field is updated with the
page number of the address being written to. Hardware automatically masks writes to the PAGEN field so that only bits
representing valid page numbers can be written, all other bits in PAGEN are always 0. As an example, in a flash with 1024
pages (page 0 - page 1023), bits 15:10 will always be 0.
Table 14-4. Semantic of PAGEN field in different commands
Command
PAGEN description
No operation
Not used
Write Page
The number of the page to write
Clear Page Buffer
Not used
Lock region containing given Page
Page number whose region should be locked
Unlock region containing given Page
Page number whose region should be unlocked
Erase All
Not used
Write General-Purpose Fuse Bit
GPFUSE #
Erase General-Purpose Fuse Bit
GPFUSE #
Set Security Fuses
Not used
42023C–SAM–02/2013
275