µTasker Forum > utFAT

Files saved on SD card dont show on PC

<< < (3/6) > >>

neil:
Hi Mark
  Thanks for the reply. I will take a look and see if its this causing the issue. You are correct with the files on the card,  FLUSH, 2015, INDEX, CALIB . There are all files names in the root directory , and 2015 is a folder where data is stored.

Regards
Neil

neil:
Hi Mark
  What routines use this? Is the size dictated during the format procedure?  I remember it used to work okay before the last SD latest version. I simply overwrote the .h and .c mass storage files. Was there anything else needed?


regards
Neil

mark:
Hi Neil

Exchanging the utFAT files in its folder is all that is needed at an update.

I suggest doing the following as a test: reformat the card and the create a directory, monitoring the location of the directory object. This is how it should work, using the command line:

  Disk interface
===================
up           go to main menu
info         utFAT/card info
dir          [path] show directory content
dird         [path] show deleted directory content
dirh         [path] show hidden content
infof        [path] show file info
infod        [path] show deleted info
cd           [path] change dir. (.. for up)
file         [path] new empty file
write        [path] test write to file
mkdir        new empty dir
rename       [from] [to] rename
trunc        truncate to [length] [path]
print        [path] print file content
del          [path] delete file or dir.
undel        undelete [name]
format       [-16/12] [label] format (unformatted) disk
fformat      [-16/12] [label] full format (unformatted) disk
re-format    [-16/12] [label] reformat disk!!!!!
re-fformat   [-16/12] [label] full reformat disk!!!!!
sect         [hex no.] display sector
help         Display menu specific help
quit         Leave command mode
>re-format TEST
Formatting FAT32 in progress - please wait...
D:\>**Disk formatted
Disk D mounted
dir
Directory D:\

0 files with 0 bytes
0 directories, 4115947520 bytes free
D:\>info

Disk TEST (4124049408 bytes) SDHC FAT32
Bytes per sector: 512
Cluster size: 4096
Directory base: 0x00000002
FAT start: 0x0000005f
FAT size: 0x00001eb3
Number of FATs: 2
LBA: 0x00003dc5
Total clusters: 0x000f5547
Info sect: 0x00000040
Free clusters: 0x000f5546
Next free: 0x00000003
CSD: 0x40 0x0e 0x00 0x32 0x5b 0x59 0x00 0x00 0x1e 0xb9 0x7f 0x80 0x0a 0x40 0xff 0x00
D:\>sect 3dc5
Reading sector 0x00003dc5
 0x54534554 0x00000000 0x08000000 0x60000000 0x44eb44eb 0x60000000 0x000044eb 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
D:\>mkdir dir1
sect 3dc5
Reading sector 0x00003dc5
0x54534554 0x00000000 0x08000000 0x60000000 0x44eb44eb 0x60000000 0x000044eb 0x00000000 0x69006441 0x31007200 0x0f000000 0xffffe400 0xffffffff 0xffffffff 0x0000ffff 0xffffffff
 0x0a010020 0x0c161d0c 0x1000002f 0x60000000 0x44eb44eb 0x60000000 0x000344eb 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
D:\>

Notice that in the root directory of a freshly formatted card there is just a single entry (the volume entry - TEST in this case). When I create a directory there is a new directory object added immediately after it.
From what I could see from your card, each new directory object is added in the next cluster (4kBytes away), rather than "immediately" after the present entry.

In fnCreateFile():
    ptrFoundEntry = (DIR_ENTRY_STRUCTURE_FAT32 *)ptr_utDisk->ptrSectorData; // the directory entry in the sector buffer
    ptrFoundEntry += ptrDiskLocation->ucDirectoryEntry;                  // move to the present directory entry

Here the pointer ptrFoundEntry should point to the first entry and then increment to the next (free location). ptrDiskLocation->ucDirectoryEntry will be 1 on first use and so increment by 32 bytes.

If this works correctly the question is whether it is a problem that starts only over time and usage.

Regards

Mark

neil:
Hi Mark
  Thanks for this. Where would I find the latest version of your utasker Demo?  It happens on all cards we used, and as soon as we use them.

Regards
Neil

mark:
Neil

If you are using debug.c you will have this interface in your code.
You can take V1.4.7 and build for a standard target - or better, the latest developer' code at http://www.utasker.com/kinetis/developers.html

If you would like to compare with a standard build there are binaries at http://www.utasker.com/kinetis.html

Regards

Mark

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version