Slow USB Mass Storage with SD Card

Hello all,

We are porting a NETMF application running on a G120 to a TinyCLR application running on a SCM20260N. One of our existing use cases is to plug the device into a PC and access the storage SD Card on the board from the PC.

I implemented the function using TinyCLR from this sample code USB Client

It appears to be working but is operating very slow. On the order of 20-30 seconds to open a small text file from the PC. I have tried formatting the SD Card to FAT and FAT32 with no change. I have also tested the SD card on the older G120 application and it works well.

Any ideas?

Hi,

it should be around 10->15 seconds. There is known issue about this:

Usb Client MSC: take more than 10 seconds to show new drive on PC. · Issue #1146 · ghi-electronics/TinyCLR-Libraries (github.com)

By the way, how long is it on G120 if same SD card?

With the G120, it takes a few seconds for the drive to show up and populate on the computer. The real issue seems to be the time it takes to open files. I see no noticeable difference between the G120 implementation and plugging the SD Card directly into my computer. I am also dealing with relatively small files here (<100KB).

The TinyCLR version takes significantly longer.

When we have time, we will check what is different between them. They use same driver and TinyCLR even read SD much faster than G120.

Hi, we just tried few SD cards on G120 (4.2 and 4.3), all of test result are slower than SITCore if same SD.

They are tested on Window 10.

Probably when you tested on G120, it was on Window 7, now SITCore on window 10?

I remember when we worked on G120, it was only few seconds as you said, and at that time we tested on win7, but now try on window10, most of them are 25-30 seconds.

Could you tell us what kind of SD you have that make G120 faster than SITCore? We would like to investigate more on this issue.

1 Like

Just a bit more information, we use same SD card:

Window 10:
SITCore: 23 seconds
G120: 30 seconds

Linux Ubuntu 20:
SITCore: 8 seconds
G120: 8 seconds.

I think we may be talking about two different issues here. In my original post, the issue was concerning slow reads from the SD card while acting as a client. In my testing however, I not able to reproduce this issue on any other computer apart from my development laptop. For now I would consider this a localized computer issue.

As for the second issue which I believe you are referencing here: Usb Client MSC: take more than 10 seconds to show new drive on PC. · Issue #1146 · ghi-electronics/TinyCLR-Libraries · GitHub
In my testing there appears to be a longer delay on the SITCore device compared to the G120.

I just performed some basic testing with a stopwatch and a G120, the mass storage device showing up and usable in Windows consistently under 5 seconds. Unfortunately, my only development SITCore board is in testing and I don’t have access to it at this time, but I believe it was closer to 10 - 15 seconds.

Testing was done on Windows 10 and 11 computers.
Using an Apacer 4GB sd card. I can try some other brands also.

Thanks for getting back to this.