# Size of Samsung NAND Flash K9xxG08xxM

I am writing device driver for Samsung NAND flash K9xxG08xxM. I am not aware of exact part number as its staked board. But Device ID of flash is

EC D5  51 A6 68


As per data sheet

I am having 16 Giga bits of Data which 2 GB ( 2 Giga Bytes ) of memory size.

But as per 4th Byte

Memory size is = Page size * No of block size = ( 4 * 1024 ) * ( 256 * 1024 ) = 1073741824

Which is 1 GB ( 1 Giga Bytes )

So what is the actual memory size from above device ID ?

• Yes. But this datasheet is referring 3 variants ( part models ). Figure 2 shows general view with maximum memory size. I have confusion due to 2 memory size calculated based on Byte 4 and 5 of device ID reply. Aug 26 '15 at 14:42
• you have to use the two ID 4th and 5th to calculate your memory size and map, (see the memory map from the datasheet). If you have 1GB memory size from the the 4th ID you have organize it in 4 planes of 4 Gb which is 2GB of memory Aug 26 '15 at 14:55
• I think better option is actually write to highest location and verify. Let me give try and come back. Aug 26 '15 at 14:57
• So you can verify if it's empty or no Aug 26 '15 at 15:01

If you multiply the page size with the block size you will end up with bit², which is not a common storage unit, so that can't be right. There is also no 1 gigabyte device available.

I find that datasheet rather hard to understand. In their figure 2, they list the device organization like the following:

• 1 Page = (4k + 128)Bytes
• 1 Block = 64 Pages = (256k + 8k)Bytes
• 1 Device = 8192 Blocks = 16.896 Mbits (why the hell the sudden bits? -> 2GB, the smallest device)

Now I don't know where the number of blocks is coming from, as well as I don't know where the number of pages is coming from. So I'd assume they are constant.

Based on that:

We have a page size of 4kB and a block size of 256kB (which seems like a redundant information if each block is 64 pages), so that matches with the above calculation to a 2GB device (using 8192 blocks per device).

Furthermore your calculation of number of planes times size of planes seems also reasonable 110_b turns to 4 gigabit planes, and 10_b to 4 planes, so 16 gigabit, which is also 2GB.

So I think it is safe to assume that this is a 2GB device.