Registers to Ignore
You do not need to initialize the following registers in the
config
group:
• The
transfer_spare_reg
register. The data transfer mode can be initialized using MAP10 commands.
• The
write_protect
register need not be initialized unless you are testing the write protection feature.
Flash-Related Special Function Operations
This section describes all the special functions that can be performed on the flash memory.
The functions are defined by MAP10 commands as described in
Command Mapping
.
Related Information
on page 10-6
Erase Operations
Before data can be written to flash, an erase cycle must occur. The NAND flash memory controller supports
single block and multi-plane erases.
The controller decodes the block address from the indirect addressing shown in
MAP10 Address Mapping
.
Related Information
on page 10-10
Single Block Erase
A single command is needed to complete a single-block erase, as follows:
1. Write to the command register, setting the
CMD_MAP
field to 2 and the
BLK_ADDR
field to the desired
erase block.
2. Write 0x01 to the
Data
register.
For a single block erase, the register
multiplane_operation
in the
config
group must be reset.
After device completes erase operation, the controller generates an
erase_comp
interrupt. If the erase
operation fails, the
erase_fail
interrupt is issued. The failing block's address is updated in the
err_block_addr0
register in the
status
group.
Multi-Plane Erase
For multi-plane erases, the
number_of_planes
register in the
config
group holds the number of
planes in the flash device, and the block address specified must be aligned to the number of planes in the
device. The NAND flash controller consecutively erases each block of the memory, up to the number of
planes available. Issue this command as follows:
1. Write to the command register, setting the
CMD_MAP
field to 2 and the
BLK_ADDR
field to the desired
erase block.
2. Write 0x01 to the
Data
register.
For multi-plane erase, the register
multiplane_operation
in the
config
group must be set.
After the device completes erase operation on all planes, the NAND flash controller generates an
erase_comp
interrupt. If the erase operation fails on any of the blocks in a multi-plane erase command,
an
erase_fail
interrupt is issued. The failing block's address is updated in the
err_block_addr0
register in the
status
group.
NAND Flash Controller
Altera Corporation
cv_54010
Registers to Ignore
10-32
2013.12.30