Alres
Did you update the "usb_application.c" file to check whether the behavior remains the same?
At the moment I can't explain how a transfer above a certain size will (always) result in it freezing at 98% (is it always 98% or is it random?).
I'll explain the USB-MSD operation:
- the first thing to understand is that the PC host is entirely in control of the FAT
- the PC host writes and reads SD card sectors (always 512 bytes at a time) in order to save data to the card and to modify the file objects(s) and the FAT entries
- the USB-MSD class has almost no intelligence with respect to the data being copied or the file system being used
- when the PC transfers 1 byte or 100MBytes the USB-MSD class simply has more reads/writes to execute but it has no idea about what is being read or written and also has no idea how much more data will be transferred until the transaction is complete
Due to the above explanation and reasoning I see no reason for a file size to cause a difference in behavior and so couldn't explain why a transfer freezes at a certain percentage.
The only dependency that I could see with the file size is the amount of of written blocks of data - if there is a "chance" or a transfer failing for whatever reason, the probability of a failure at some point during the transfer would increase with the fie size. However it still it wouldn't explain it occurring at the same point in a file transfer.
I think that it will be necessary to repeat tests to be sure of a representative description of the error in order to identify where its cause could be. Also, are there other activities in the firmware that may have an effect (eg. things that are performed at certain times?)
Regards
Mark