MSD example

cancel
Showing results for 
Search instead for 
Did you mean: 

MSD example

528 Views
mircopizzichini
Contributor III

Hello

 

I've just installed KDS with Kinetis SDK, and I'm trying to build some examples before porting my Codewarrior project, where I access SD card through USB.

Currently I'm checking if MSD example (located in KSDK_1.1.0\usb\example\device\msd) works. I was able to build and download that project for my twrk60: when I plug-in USB cable a new mass storage is detected on PC and I can see files on SD card!

 

The problem is when I try to write data (or read) on SD card from PC. The USB_MSC_DEVICE_WRITE_REQUEST event is correctly asserted, but nothing is written on the card.

 

What could be the problem?

Why in this example you advise using OS MsgQueue instead of direct SDCARD_DRV_WriteBlocks? I tried also using directly the driver API, but maybe I'm wrong to pass function arguments, it doesn't work.

 

Thank you

Mirco

Labels (1)
Tags (3)
0 Kudos
3 Replies

147 Views
mircopizzichini
Contributor III

I partially solved it.

Setting the USE_RTOS define to 0, when I receive USB_DEV_EVENT_DATA_RECEIVED, SDCARD_DRV_WriteBlocks is called directly and it works. The same for reading operation.

The problem is that the speed is still too slow (I cannot reach 200kB/s)... Is there any trick to improve it?

0 Kudos

147 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Mircopozzichini,

I tried the demo you mentioned, no need to modify the code, the write speed can reach 256KB/s, please kindly refer to the following for details.

sdk.png

so maybe the SD card class level is the bottleneck , my SD card is SanDisk Class 4 8GB, what about yours?


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

147 Views
mjbcswitzerland
Specialist V

Hi Mirco

Please compare the following (there are versions for all K60 tower boards)

http://www.utasker.com/kinetis/TWR-K60N512.html

http://www.utasker.com/kinetis/TWR-K60D100M.html

http://www.utasker.com/kinetis/TWR-K60F120M.html

If you find its USB-MSD SD card speed is adequate you may prefer to use it - it builds out-of-the-box with KDS and allows the card to operate as USB-MSD as well as with a web server and FTP.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

K60: http://www.utasker.com/kinetis/TWR-K60N512.html / http://www.utasker.com/kinetis/TWR-K60D100M.html / http://www.utasker.com/kinetis/TWR-K60F120M.html

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos