µTasker Forum

µTasker Forum => utFAT => Topic started by: Manish on February 11, 2011, 11:35:57 AM

Title: File corrupt if write more then 300Kb
Post by: Manish on February 11, 2011, 11:35:57 AM
Dear Mark,
 
  Folder and file created properly and also getting from FTP but Now I have problem with file size, mean while I am writing file more then 300 Kb , it writes but corrupt some data and again write properly within same file and other problem is that I am not able to read SDCARD in PC after writing some file which have size more then 300 but when I am trying to see from ftp it is displaying Folder and file sequence. So can you please focus on this how this could be possible. i am accessing SDcard using SPI mode.

Thank you
Manish Dabhi   
Title: Re: File corrupt if write more then 300Kb
Post by: mark on February 11, 2011, 03:35:22 PM
Hi Manish

Please could you give me the following details?
1) Process used
2) utFAT version used (see the comments at the start of the file mass_storage.c)
3) Which type and size of SD card is being used?

I will send you the latest version in case you don't have it to be sure that you have all patches.
Please send me also the file that is causing problems and the directory structure (eg. its folder name and sub-folders). If possible try to keep the directory structure as simple as possible so that I can test easier (eg. the simplest case is to start with a freshly formatted card and add just 1 file).

Regards

Mark
Title: Re: File corrupt if write more then 300Kb
Post by: Manish on February 15, 2011, 07:45:48 AM
hi Mark,
 
  Actually There were problem of Old Sdcard version. I have been downloaded lastest verion V1.6 from forum and it's work but now I am trying create file name more then 8 length it create error I mean there is no Long File Name support, I checked code and see then every you were describe Name array 11 means I can create file name update to 11 [8+1+3], so can you suggest me what how can I enable LFN in sdcard.?

Thank you
Manish Dabhi
Title: Re: File corrupt if write more then 300Kb
Post by: mark on February 15, 2011, 11:46:13 AM
Hi Manish

The utFAT supports reading files with LFN but not writing or deleting them.

There is no simple fix for this because it is quite complicated (especially deleting long file names since it requires working backwards through the file allocation table). Also there are potential legal issues involving supporting LFN writing since it is patented by Microsoft (although a workaround as in Linux could probably solve this).

Keeping locally generated file names to 8.3 format is therefore a requirement. Saving long file names when the card is in a PC is however not a problem since these can still be read.

Regards

Mark