Altera Cyclone V Device Handbook page 673

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

cv_54010
2013.12.30
2. Write 0x41 to the Data register.
Configure for Main+Spare Area Access
To configure the NAND flash controller to access the main+spare area:
1. Write to the command register, setting the CMD_MAP field to 2 and the BLK_ ADDR field to the target
block.
2. Write 0x43 to the Data register.
Read-Modify-Write Operations
To read a specific page or modify a few words, bytes, or bits in a page, use the RMW operations. A read
command copies the desired data from flash memory to a page buffer. You can then modify the information
in the buffer using MAP00 buffer read and write commands and issue another command to write that
information back to the memory.
The read-modify-write command operates on an entire page. This command is also useful for a copy type
operation, where most of a page is saved to a new location. In this type of operation, the NAND flash controller
reads the data, modifies a specified number of words in the page, and then writes the modified page to a new
location.
Note:
Because the data is modified within the page buffer of the flash device, the NAND flash controller
ECC hardware is not used in RMW operations. Software must update the ECC during RMW
operations.
Note:
For a read-modify-write command to work with hardware ECC, the entire page must be read into
system memory, modified, then written back to flash without relying on the RMW feature.
Read-Modify-Write Operation Flow
1. The flow starts by reading a page from the memory:
• Write to the command register, setting the CMD_MAP field to 2 and the BLK_ADDR field to the starting
address of the desired block.
• Write 0x60 to the Data register.
This step makes the page available to you in the page buffer in the flash device.
2. Next provide destination page address:
• Write to the command register, setting the CMD_MAP field to 2 and the BLK_ADDR field to the
destination address of the desired block.
• Write 0x61 to the Data register.
This step initiates the page program and provides the destination address to the device.
3. Use MAP00 page buffer read and write commands to modify the data in the page buffer.
4. Write the page buffer data back to memory:
• Write to the command register, setting the CMD_MAP field to 2 and the BLK_ADDR field to the same
destination address.
• Write 0x62 to the Data register.
This step performs the write.
NAND Flash Controller
Send Feedback
Configure for Main+Spare Area Access
10-35
Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents