Atmel SAM4S-EK2 Atmel ATSAM4S-EK2 ATSAM4S-EK2 Ficha De Dados
Códigos do produto
ATSAM4S-EK2
316
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
Flash Error: at the end of the programming, the WriteVerify test of the Flash memory has failed.
By using the WP command, a page can be programmed in several steps if it has been erased before (see
below). This mode is called Partial Programming.
After any power-on sequence, the flash memory internal latch buffer is not initialized. Thus the latch buffer must be
initialized by writing the part-select to be programmed with user data and the remaining of the buffer must be written with
logical 1.
initialized by writing the part-select to be programmed with user data and the remaining of the buffer must be written with
logical 1.
This action is not required for the next partial programming sequence because the latch buffer is automatically cleared
after programming the page.
after programming the page.
Figure 20-7. Example of Partial Page Programming
20.4.3.3 Erase Commands
Erase commands are allowed only on unlocked regions. Depending on the Flash memory, several commands can be
used to erase the Flash:
used to erase the Flash:
Erase all memory (EA): all memory is erased. The processor must not fetch code from the Flash memory.
Erase pages (EPA): 4, 8, 16 or 32 pages are erased in the memory plane. The first page to be erased is specified
in the FARG[15:2] field of the MC_FCR register. The first page number must be modulo 4, 8,16 or 32 according to
the number of pages to erase at the same time. The processor must not fetch code from the Flash memory.
in the FARG[15:2] field of the MC_FCR register. The first page number must be modulo 4, 8,16 or 32 according to
the number of pages to erase at the same time. The processor must not fetch code from the Flash memory.
Erase Sector (ES): A full memory sector is erased. Sector size depends on the Flash memory. FARG must be set
with a page number that is in the sector to be erased. The processor must not fetch code from the Flash memory.
with a page number that is in the sector to be erased. The processor must not fetch code from the Flash memory.
The erase sequence is:
Erase starts as soon as one of the erase commands and the FARG field are written in the Flash Command
Register.
Register.
Erase All Flash
Programming of the second part of Page Y
Programming of the third part of Page Y
32-bit wide
32-bit wide
32-bit wide
X words
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
...
CA FE
CA
FE
CA FE
CA
FE
CA FE
CA
FE
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
CA FE
CA
FE
CA FE
CA
FE
CA FE
CA
FE
DE CA
DE CA
DE CA
DE CA
DE CA
DE CA
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
Step 1.
Step 2.
Step 3.
...
...
...
...
...
...
...
...
...
...
...
X words
X words
X words
So Page Y erased