1
\$\begingroup\$

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 5th Byte

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

But as per 4th Byte 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 ?

\$\endgroup\$
4
  • \$\begingroup\$ 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. \$\endgroup\$
    – prasad
    Aug 26 '15 at 14:42
  • \$\begingroup\$ 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 \$\endgroup\$
    – R Djorane
    Aug 26 '15 at 14:55
  • 1
    \$\begingroup\$ I think better option is actually write to highest location and verify. Let me give try and come back. \$\endgroup\$
    – prasad
    Aug 26 '15 at 14:57
  • \$\begingroup\$ So you can verify if it's empty or no \$\endgroup\$
    – R Djorane
    Aug 26 '15 at 15:01
1
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.