HiI use mass storage sample from STM32Cube_FW_F4_V1.21.0\Projects\STM324xG_EVAL\Applications\USB_Device\MSC_Standalone
What kind of file systems does this example work?Does it work with the NTFS file system?
A mass storage system that works properly will work with all file systems.
NTFS can be more challenging as it uses the beginning, middle and end of the media for structures, compared to FAT that uses the front and moves from there to the end incrementally.
If the implementation is broken, NTFS will break early. You should perhaps validate the implementation at a block read/write level first.
Hi mostafa z,
I tested the "MSC_Standalone" application with a 4GB microSD card and it was working conveniently even with NTFS.
For your case, is the example working with other file system?
Microsoft really doesn't like people using NTFS for removable media (disks or flash drives) as their ability to detach/eject, and the journalling nature, is complicated. Pulling media from an active drive can results in coherency issues.
It is going to be sensitive to GET CAPACITY returning the correct values, and the READ/WRITE allowing access to all the blocks described, off-by-one type issues here can result in access errors and failure. Also issues with block numbers and byte offsets, and constraints of 32-bit number space will induce failure. ST has addressed many of the byte/block offset and 32/64-bit representation issues, but these things can be traps for the unwary, or mis-casting of math computations.
Seem to also remember key structures having checksums, so any discrepancies with write/read data integrity will also get flagged.
Thank you very much for your replyYes, this project works correctly with the FAT32 and exFAT file systems. My problem here is when I format the partition with NTFS and copy a nearly 4 GB file onto an 8 GB capacity microSD, if I will restart or separate the device during the copy. Requests for formatting the corresponding partition in the reconnect, of course, sometimes after the complete copy of the file is also seen
Please, if possible, test this item and give me guidance
NTFS is not going to like unexpected removal. ST isn't going to be able to address underlying caching and coherency issues created by Microsoft.
HelloThe problem I solvedI said I would say that someone else might have this problem
By changing the type of variable (scsi_blk_addr in usbd_msc.h using uint32_t format) to (uint64_t) the problem was solved.
Retrieving data ...