I have some questions about nand memories.
- Do we need to erase whole block to rewrite only one page?
- If true, what is the algorithm? Cache whole block > edit one page > erase whole block > write whole block?
- How random data input works? Do we need erase block to input few bytes in random mode???
p.s. I am writing MSD application with STM32F207ZG mcu + K9F1G08U0B nand
EDIT For newbies like me
How NAND flash works:
We can perform read and write on page basis or use random input or random output in any page. Nothing special about reading, but i hear that reading, like writing, may wear pages.
After erase all bits in erased area is set to 1, and when we write, we only set some bits to 0. Once bit is set to 0, it cannt be set to 1 again, setting bit to 1 is possible only by erasing region containing that bit. As consequence, if we need to fill some region with 0x00, we do not need to erase this region.
And note: Erase can be performed only on block (not page) basis. I found, that when you specify page address to erase, block containing that page will be erased. So we need to specify not a block number to erase, but for example number of first page in block.
Hope this information is correct and will be helpful for someone. Sorry for my broken english ;)
Thanks to supercat for explanation.