USB MSC Data Rate on FRDM-K64F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB MSC Data Rate on FRDM-K64F

947 Views
digibin
Contributor I

I have a FRDM-K64F platform on which I'm experimenting with USB mass storage class. I've taken the 'usb_device_msc_sdcard' example program from KSDK 2.0 and downloaded it to the board. Initially it was very slow but after increasing the USB_DEVICE_MSC_WRITE_BUFF_SIZE and USB_DEVICE_MSC_READ_BUFF_SIZE macros the data rate increased significantly. I've set these two macros to 31232U as this appears to be the maximum value. Any higher and the project will not build. I'm using Kinetis Design Studio. Using this I'm achieving transfer rates of around 700-800 kB/s.

 

I'm wondering if I can further increase the data rate without making any real software changes/optimisations, - i.e. any quick changes I could make like increasing the above buffer sizes.

 

I suspect I may need to move to a hardware platform that supports USB High Speed to really hit good transfer rates, but if I can improve the speed on the platform I have at the moment that would be great.

Labels (1)
Tags (2)
0 Kudos
1 Reply

506 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Mike,

I´m attaching you exact explanation from our Application Team regarding your request:

1. Debug version is slower than release version,

2. When test the performance, please plug out all the debugger, such as j-link.

3. SDHC clock source is BOARD_SDHC_CLKSRC, actually, it is kCLOCK_CoreSysClk, this will impact the sdhc write speed, on sdk2.0 frdmk64 default setting is 120MHz. it is best.

4. USB_DEVICE_CONFIG_USE_TASK this macro will impact the write speed, you may see more detail about this in readme.

5. the USB_DEVICE_MSC_WRITE_BUFF_SIZE is not necessary to be same with USB_DEVICE_MSC_READ_BUFF_SIZE,

If you need write more data then read, you may increase the USB_DEVICE_MSC_WRITE_BUFF_SIZE and decrease the USB_DEVICE_MSC_READ_BUFF_SIZE

6. K64 is full speed controller, the best theory value is 1.25MB(12Mb/8), considering the protocol overhead, the value should be lower. I have tested sdcard performance on k65 KHCI (full speed controller), the sdcard is a sandisk ultra 1, and  the write buffer size is 64*512,  use the release version example and plug out the jlink after download the example, the performance is ~1MB.

The following is the sdcard I use, you could use a better sdcard with higher performance. Then the performance will be higher.

7. if  ~1M performance can’t meet your need, I think one board with high speed usb may meet your need.

sandisk.png

I hope this clarifies you.

In case of any questions, please let us know.

Best Regards,

Iva

0 Kudos