All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Test readout, help to understand
PostPosted: April 12th, 2024, 6:33 
Offline

Joined: November 10th, 2022, 16:20
Posts: 16
Location: localhost
I am still playing with FT2232 and made read of NAND memory from real USB memory.
Patient is TC58NVG4D2ETA00 controller TC58NC2233G5F. The memory read looks like in attached picture.
I can see some almost repeatable patterns on some pages, but majority of pages are a kind empty.
I am not 100% sure the visualisation from GIMP is correct, but in hex editor it looks like first block is "occupied", second also, third is kind empty. Later even blocks are occupied with data and odd empty, until like 20-40% of memory. Later part of memory are interleaved blocks containing 00 only and FF only.
Could it be the USB stick has not been factory initialized or never filled with data?


Attachments:
nand.png
nand.png [ 415.39 KiB | Viewed 656 times ]
Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 12th, 2024, 9:06 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
Quote:
Could it be the USB stick has not been factory initialized or never filled with data?
I suggests working on a memory that is 100% fully written, now hard to tell is this problem with wrong parameters or empty memory.


Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 13th, 2024, 9:55 
Offline

Joined: November 10th, 2022, 16:20
Posts: 16
Location: localhost
I suspect first visualization was incorrectly generate, it did not cover whole memory.
I have also tried to use another tool to read NAND.
For the previous read the disk was empty, but only few hundred MBs at the begining was zeroized.
There were some sectors (from OS point of view) not zeroized. I overwritten whole disk by zeros then readback to verify.
First picture if whole memory, second picture is top left corner.
Questions:
1. What are those white/black stripes? Are those physical damaged "blocks" or factory marked as bad? (starting about 45% of first image).
2. What are those set of pages at the begining? The looks like set of pages full of data, interleaved by empty blocks. Is it firmware for controller? (it is better seen on second image).
3. I wrote the pendrive with ~2GB of data, the chip contains 2.25GB of space, looking at visualization, only 60% of NAND is consumed, where is data stored? Is controller smart enough to reuse some blocks/pages as they all contains zeroes? Or not all pages has been read correctly?
4. there are few pages not full written (market in red) what are those? Some metadata related to pages/blocks?


Attachments:
nand_all.jpg
nand_all.jpg [ 212.83 KiB | Viewed 502 times ]
nand_top_left_fragment.jpg
nand_top_left_fragment.jpg [ 183.81 KiB | Viewed 502 times ]
Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 14th, 2024, 11:04 
Offline

Joined: November 10th, 2022, 16:20
Posts: 16
Location: localhost
Trying to find where is data, I created FAT32 FS on the pendrive, and fill whole 2GB with totally random data. The layout does not differ a lot, from the pictures above, still 2GB consumes about 1GB in NAND memory.
I tried different ideas, one was to check if there is data is somewhere "after" the last block? Addressing allows that, I tried to read block numer 2084 and got some data.
I tried to match those data, is they already exists somewhere "earlier" (if NAND addressing will rollover or sth). I could not find 4 bytes from page 2084 anywhere in the read 0-2083. I checked again datasheet and now I am really confused, by datasheet, storage area for data should be continues, blocks are addressed 0-2083, but I see some empty space in range 0-2083 and something which looks like data after block 2083. What I am doing wrong? I know my tools are hobby quality, but I had investigated addresing bits what they contains, and everything looks correct.


Attachments:
nand_blocks.png
nand_blocks.png [ 68.4 KiB | Viewed 399 times ]
Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 14th, 2024, 17:22 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15549
Location: Australia
I think it makes more sense to write the LBA number to each sector, ie data = LBA. I recall that one of the tool vendors provides a free utility for this purpose.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 14th, 2024, 18:27 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15549
Location: Australia
I believe Pattern Writer is the "data=LBA" tool.

https://web.archive.org/web/20200303061713/http://www.flash-extractor.com/downloads/

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Test readout, help to understand
PostPosted: April 17th, 2024, 14:23 
Offline

Joined: November 10th, 2022, 16:20
Posts: 16
Location: localhost
fzabkar wrote:
I think it makes more sense to write the LBA number to each sector, ie data = LBA. I recall that one of the tool vendors provides a free utility for this purpose.
I can suspect where this will lead me, but how to deal with XOR without dedicated tool. If the read is not trusted for data and address I am adding another variable to equation.
At least can somebody confirm and deny, the NAND should behave more reliable, data should not be compressed anyway (even some simple way like reusing content of adjacent pages/blocks), addressing should be linear as I read in datasheet, etc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group