Hi, All I am using KDS and MQX with board Twr-K21F120M mouted with the SD card to work as USB device when connected to the PC.

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

Hi, All I am using KDS and MQX with board Twr-K21F120M mouted with the SD card to work as USB device when connected to the PC.

625 Views
jatinvashisth
Contributor I

Hi All,

 

I am using KDS with MQX version 4.2 with board Twr-K21F120M .

I have mounted an SD card to the board and connect it to PC.

I want that SD card to be detected as USB device on PC. I am attaching the file which is I am using to do the same.

But I am not able to do it.

Kindly help. Its urgent.

Original Attachment has been moved to: demo.c.txt.zip

Labels (1)
0 Kudos
1 Reply

428 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Jatin:

There is a msd demo in the MQX installation folder, it is very similar to your requirement

Freescale_MQX_4_2\usb_v2\example\device\msd

In this demo, ram disk or sd disk can be enabled , there is a macro control it.  in file disk.h

#define RAM_DISK_APP                        (0)
#define SD_CARD_APP                         (1)

unfortunately, TWR-K21F120M is not supported in MQX 4.2, you need to port this example from TWR-K22 to TWR-K21.

Please refer to porting guide.

Freescale_MQX_4_2\doc\usb_v2\USB_Stack_Porting_User_Guide.pdf

Regards

Daniel


Have a great day,
Daniel

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

0 Kudos