Microcontroller interfacing with NAND flash memory

Status
Not open for further replies.
Hello,

I am working with TOSHIBAs NAND flash memory. I am using standard SPI protocol to communicate with it. The datasheet is in the link below. I am trying to understand and solve two problems:

1. I do not understand what exactly is the column address of a NAND flash memory. On page 4 of the datasheet it is said that a column address is the byte location within a page and that the page is the smallest addressable unit for reading and writing data. Since pages are located in blocks of the memory, shouldn't that mean I only need the address of the block and page from which I need to read data/ to which i need to store data? Also, if a page is the smallest addressable unit for reading and writing, how am I able to write (and read) only into specific byte locations of the page by specifying the column address in the SPI transaction sequence needed for the given operations (That means that a page is actually not the smallest addressable unit for writing and reading data. Instead, a byte within a page is the smallest addressable unit)? In summary, i need to understand what the column address is used for and why am I able to write data into specific byte locations of a page since a page is the smallest addressable unit for writing and reading.

2. I am having trouble identifying bad blocks. The reason is that i do not understand from the datasheet how exactly to do that. On page 31 of the datasheet, under "Bad Block Inhibit" subtitle, it is said that the chip has bad blocks which shouldn't be erased and in which data should not be stored. Also it is said that the device has a bad block inhibit function (I am not sure what exactly that is). However, it does not say that the data of the bad block cannot be read. Moving on to page 37, beneath the subtitle "Invalid Blocks", It is said that the bad block mark is in every page of the bad block. To identify a bad block, I need to read any byte from any page of a block which validness I am checking, and if the read value is 0x00 instead of 0xFF, the block is bad and I need to make an algorithm to avoid storing data into the bad block (I have not erased any bad block). When I try to read a page byte value from all the blocks sequentially (starting from block 0) to check if any of them is 0x00, the read sequence freezes at the third block. Apparently I am doing something wrong and I do not know what (note that the read and write command works for every other page except any page from block 767). How can i read a value of a bad block successfully?

I do not have a logic analyzer.

I am open to suggestions,
Best regards
 

Attachments

  • memory.pdf
    1.6 MB · Views: 350
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…