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
If you have questions, please follow the below thread for update
Hi, All I am using KDS and MQX with board Twr-K21F120M mouted with the SD card to work as USB device...
Regards
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------