crc in flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

crc in flash

1,180 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by badri89 on Sun Jun 12 21:03:01 MST 2011
Hi I am trying to read a file from usb flash drive(fat32). I wanna know where will be the sector checksums of the corresponding sectors be located in a flash for checking of data integrity. I know in flash they will be mapped to a separate sector but couldnt able to find the location.Kindly help me on this!
0 Kudos
Reply
4 Replies

1,113 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Jun 13 04:27:02 MST 2011
If you read a file and the power goes off ...
With the lights out there is no way to read a book - or a flash drive :eek:

If you are writing a file and the power goes off ... then the FAT and the directory entry have not been updated.

If data integrity is important I would implement my own CRC or ECC or use something like this.


Quote:

Are you saying the crc check and data integrity is taken care by my usb flash controller itself?

No, I am saying that it depends. The industry grade storage solutions from STEC do include an ECC - it is written in their product specification - but I would not assume there is any real CRC or ECC mechanism in the cheap USB sticks you buy at your local supermarket.
On Windows a full format of a harddisk or USB Flash drive will check each block to see if it is a bad block or not.

Rob
0 Kudos
Reply

1,113 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Mon Jun 13 02:26:19 MST 2011
I think that after a powerproblem it is safer to reread the file. Or are you just moving from one flash memory to another? In that case a verify routine can help.
0 Kudos
Reply

1,113 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by badri89 on Mon Jun 13 01:06:37 MST 2011
hi thanks for ur reply! no am not talking about internal flash of lpc..I tried searching for FAT filesystems websites and couldnt find enough info regarding how CRC is kept in flash memory sectors.!Are you saying the crc check and data integrity is taken care by my usb flash controller itself?lets say am reading a file and my power goes off! how can i check whether the file i ve read is correct or not!
0 Kudos
Reply

1,113 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Jun 13 00:03:53 MST 2011
You lost me.

You are not referring to the internal flash of one of the lpc microcontrollers ???
If you want to know how FAT filesystems use data integrity it might be wise to check out a website handling FAT filesystems.
As far as I know there is no standard data integrity check on a USB flash drive. A secure drive may implement some form of a CRC or ECC check but that is not standard as far as I know.
0 Kudos
Reply