Hi everyone,
I have modified C:\Freescale\Freescale_MQX_4_0\usb\device\examples\msd example to USB SDcard MSD and its working fine on twrk60n512 . Now I want to increase the speed of data transfer over USB. I defined HIGH_SPEED_DEVICE to 1 to improve the speed, but now the program is going to despatch.s. Will this work correctly or i went wrong somewhere? Can anyone help on this to improve data transfer rate over USB.
Thanks,
Pramod.
Hi PRAMOD:
I assume you are using usb full speed mode, you can try the following steps
1.- Open the USB libraries project, located on the following path: \...\Freescale MQX 4.0\usb\host\build\cw10\
2.- On this project, search the file “khci.c“ file, in line 964: _mqx_int delay_const = 10;
3.- Change to _mqx_int delay_const = 1;
4.-Search now the file “host_cnfg.h“, and go to line 89: #define USBCFG_DEFAULT_MAX_NAK_COUNT (15)
5.-Change to #define USBCFG_DEFAULT_MAX_NAK_COUNT (150)
6.- Recompile the USB libraries, and then, the BSP and the PSP
Hope it helps
Have a great day,
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Daniel,
Thanks for your response. But am using usb device msd application, so will there be any change i if am modifying the usb host section code? .Actually i want to use sdcard as mass storage device, so which example i would use, host or device? If i want to use device example is there any way speed up the file transfer?
Please reply your thoughts on this
Thanks,
Pramod.
Hi Pramod,
Actually there are two examples available for your reference, one is a mfs demo mounted on a sdcard, you may find it in "C:\Freescale\Freescale_MQX_4_1\mfs\examples\sdcard", and the other is a usb msd device demo for ramdisk, which can be found in "C:\Freescale\Freescale_MQX_4_1\usb\device\examples\msd". and if you looked into the USB stack ver 4.1.1, there is a ready bare matel project for that topic, which can be found in "C:\Freescale\Freescale USB Stack v4.1.1\Source\Device\app\msd\iar_ew\kinetis_60", you may find that demo provide SPI and ESDHC support for SD card, so maybe this demo would be more helpful to speed up your application design:smileyhappy:Please kindly refer to the following for more details.
Hope that helps,
B.R
Kan